mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Merge pull request #1261 from benoitc/fix/1129
don't kill ourself on reload
This commit is contained in:
commit
f8e14a53b2
@ -89,7 +89,11 @@ class Worker(object):
|
||||
if self.cfg.reload:
|
||||
def changed(fname):
|
||||
self.log.info("Worker reloading: %s modified", fname)
|
||||
os.kill(self.pid, signal.SIGQUIT)
|
||||
self.alive = False
|
||||
self.cfg.worker_int(self)
|
||||
time.sleep(0.1)
|
||||
sys.exit(0)
|
||||
|
||||
self.reloader = Reloader(callback=changed)
|
||||
self.reloader.start()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user