autoreloading

6 views
Skip to first unread message

Yoan Blanc

unread,
Aug 10, 2009, 4:57:34 PM8/10/09
to Smisk
Hi,

I tried to get autoreloading working (via WSGI, a tweaked version of it
[1]) but it seems that AutoReloader quits instead of reloading
anything. How are we supposed to use it ?

Cheers,

--
Yoan

[1] http://github.com/greut/smisk/commit/8844d8db3754dac29cd1488b6a24424b4353cec1

Rasmus Andersson

unread,
Aug 11, 2009, 9:25:50 AM8/11/09
to Smisk
Hi Yoan,

However, the autoreloader works by exiting (SIGINT I think) the
process. Any web service process should have a controller process,
making sure it's alive (i.e. by running the process as a child in
apache or lighty), thus the app will be restarted (rather than
reloaded).

It it constructed like this because of the high level of complexity
where caches and things like that would otherwise be out of sync if we
only reload modules (using reload()). You are of course welcome to
create an autoreloader class which implements this, but keep in mind
the complexity of the task and the problems arising from not going the
whole way.

PS what is wsgi.util.main.Main doing? How about logging,
smisk.core.bind and setup_appdir? Are those covered?

(I also put this answer/comment onto the change set referenced earlier
[1][2])

[2] http://github.com/greut/smisk/commit/8844d8db3754dac29cd1488b6a24424b4353cec1#comment_27184
> [1]http://github.com/greut/smisk/commit/8844d8db3754dac29cd1488b6a24424b...
Reply all
Reply to author
Forward
0 new messages