2009/3/20 Florian Bösch <[email protected]>:
>
>
>
> On Mar 20, 12:26 pm, Graham Dumpleton <[email protected]>
> wrote:
>> You can't. What I pointed you at is the best you are going to get.
> I could If I wrote my own wsgi webserver. I can't is not good enough.
>
>> Why is the use of a monitor thread unacceptable?
> When doing development I don't want my code to bounce up and down
> until I've done editing. Everytime an Application gets instantiated
> there might be arbitary things going on like connecting to a database,
> retrieving schemas etc. There is a button on my browser that says
> reload. When I press that button I've done editing. That should be
> enough.

Your original query made it sound like that you wanted the behaviour
for any URL, not just a specific URL.

>> The examples shown
>> perform the check once a second which should be sufficiently fine
>> granularity for development work, and imposes a lot less overhead than
>> having a check made of every single loaded file on every request.
> Right. I've hacked up some configuration now that wipes a set of
> configured modules from sys.modules and re-imports the whole bunch
> upon every request. That's fine enough for me and still fast enough. I
> don't see that checking files would be such a grand overhead.

What you are doing is bad and isn't going to work properly in all cases.

If all you want to do is ensure that process is only restarted when
your atomic set of changes is done, then you just touch the WSGI
script file.

If you want that done via a specific HTTP URL, then have the request
handler touch the WSGI script file. If a single process, then have it
send a SIGINT to the process instead.

These sorts of things are talked about in that first document I sent
you. You do have to be using daemon mode for most of this stuff
though.

Graham

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to