Closed GoogleCodeExporter closed 8 years ago
Links related to inotify and its use in Django autoreloader.
http://code.djangoproject.com/ticket/9722
http://pyinotify.sourceforge.net/
The pyinotify module could be used now in a variant of reloader in mod_wsgi
documentation.
Original comment by Graham.Dumpleton@gmail.com
on 27 Mar 2009 at 5:44
The system of stating could be optimised. First off, when a change has been
found and flag set to indicate restart
required, then can stop doing the check for the remaining period until a
request arrives as already know a restart is
required.
The restart flag though should perhaps be per interpreter, as there is no need
for a request against a different
interpreter to trigger a full restart if nothing in that interpreter has
changed. This doesn't mean you still have to do
the periodic checks, but you can skip interpreters which are already flagged as
in restartable condition.
In the case of a process which isn't receiving any requests at all, there is no
point doing the checks. Thus, if some
multiple of the check interval has passed without any requests having been
received by the process, then can stop
performing any checks. The next time a request arrives though, a check should
be forced then. This check though
would run in the context of that request and so request would be delayed
momentarily while check done and it
determined if restart required. When doing this manual check, would be
necessary to hold up any other requests
which come in at the same time. May sound bad, but remember that this is a
process which hadn't received any
requests for a while so otherwise was idle. If determined that no restart
required, proceed as normal and restart the
periodic checks until change detected or process becomes idle again, at which
time we stop once more.
Original comment by Graham.Dumpleton@gmail.com
on 27 Mar 2009 at 9:32
This is being done by mod_wsgi express in 4.X.
Original comment by Graham.Dumpleton@gmail.com
on 17 Sep 2014 at 3:50
Original issue reported on code.google.com by
Graham.Dumpleton@gmail.com
on 27 Mar 2009 at 5:15