mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Let the reloader kill the worker by signal only
There is no reason to raise a `SystemExit` because the reloader thread will die when the worker exits anyway. Having this exception can cause tracebacks during interpreter shutdown (#910). Close #910
This commit is contained in:
parent
d53ac880b2
commit
c3b0f9f59a
@ -87,7 +87,6 @@ class Worker(object):
|
|||||||
def changed(fname):
|
def changed(fname):
|
||||||
self.log.info("Worker reloading: %s modified", fname)
|
self.log.info("Worker reloading: %s modified", fname)
|
||||||
os.kill(self.pid, signal.SIGQUIT)
|
os.kill(self.pid, signal.SIGQUIT)
|
||||||
raise SystemExit()
|
|
||||||
Reloader(callback=changed).start()
|
Reloader(callback=changed).start()
|
||||||
|
|
||||||
# set environment' variables
|
# set environment' variables
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user