mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
don't kill ourself on reload
Killing ourself when using the `--reload` option trigger an infinite loop under some monitoring services like the one in pycharm and don't reload the file. Instead set self.alive as False which will trigger later the worker exit. Note that if we want to force the exit we could also use sys.exit(0) . fix #1129
This commit is contained in:
parent
8e8611a741
commit
3cbbc713b1
@ -89,7 +89,7 @@ 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.reloader = Reloader(callback=changed)
|
||||
self.reloader.start()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user