[Grok-dev] Re: zopectl autorestart

Fernando Correa Neto fcdoth at gmail.com
Tue Jun 10 14:22:28 EDT 2008


Hey

On Mon, Jun 9, 2008 at 8:08 PM, Martin Aspeli <optilude at gmx.net> wrote:

> Peter Bengtsson wrote:
>
>> I've managed to hack zc.zope3recipes.ctl to accept another program
>> called "autorestart". You run it like this::
>>
>>  $ ./bin/zopectl autorestart src/mymodule
>>
>> It will then start an inotify watcher to watch all .py files (except
>> tests) and .pt files that define a macro and whenever it spots a
>> change it restarts Zope.
>>
>
> Why not just use the support built into paste? If you use Paste to serve a
> WSGI application, you can just do:
>
> $ paster serve --reload myprogram.ini
>
> This is what things like Pylons, TurboGears (I think) and Repoze are doing,
> and you get it for free. I'm pretty sure Philipp already experimented with
> this somewhere, even.



I didn't have time to check it out but do you know what "--reloads" means
here? Will it actually grok everything again as in a full restart or will it
just use the python built-in reload() on the file that was changed?
If it is reload(), I am not sure if this is going to work 100% since you'd
need to tell the global registries to unregister/register everything again.

Anyway, I will take a look at that.

Regards,
Fernando
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20080610/68cfed44/attachment.html


More information about the Grok-dev mailing list