mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
unblock select loop during reload of a sync worker
When reloading the worker canbe in the select loop and it will wait until timeout before handling any change. So make sure to wake up the loop before going further.
This commit is contained in:
parent
8a270c9329
commit
f9ade3af34
@ -123,6 +123,7 @@ class Worker(object):
|
||||
def changed(fname):
|
||||
self.log.info("Worker reloading: %s modified", fname)
|
||||
self.alive = False
|
||||
os.write(self.PIPE[1], b"1")
|
||||
self.cfg.worker_int(self)
|
||||
time.sleep(0.1)
|
||||
sys.exit(0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user