mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Make the gevent workers handle the quit signal by deferring to a new greenlet. Fixes #1126.
This commit is contained in:
parent
9158ab20f8
commit
fb96a9ae69
1
THANKS
1
THANKS
@ -159,3 +159,4 @@ Marc Abramowitz <msabramo@gmail.com>
|
||||
Hebert J <hebert@mail.ru>
|
||||
Kevin Littlejohn <kevin@littlejohn.id.au>
|
||||
Wolfgang Schnerring <wosc@wosc.de>
|
||||
Jason Madden <jason@nextthought.com>
|
||||
|
||||
@ -166,6 +166,11 @@ class GeventWorker(AsyncWorker):
|
||||
except SystemExit:
|
||||
pass
|
||||
|
||||
def handle_quit(self, sig, frame):
|
||||
# Move this out of the signal handler so we can use
|
||||
# blocking calls. See #1126
|
||||
gevent.spawn(super(GeventWorker, self).handle_quit, sig, frame)
|
||||
|
||||
if gevent.version_info[0] == 0:
|
||||
|
||||
def init_process(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user