mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
prevent GreenletExit exception. But we still have a warning :
http://code.google.com/p/gevent/issues/detail?id=41
This commit is contained in:
parent
bbe7e46695
commit
5ff6cd173f
@ -125,9 +125,15 @@ class GeventBaseWorker(Worker):
|
||||
gevent.sleep(0.1)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
with gevent.Timeout(self.timeout, False):
|
||||
gevent.spawn(server.stop).join()
|
||||
|
||||
server.stop(timeout=self.timeout)
|
||||
|
||||
def handle_request(self, *args):
|
||||
try:
|
||||
super(GeventBaseWorker, self).handle_request(*args)
|
||||
except gevent.GreenletExit:
|
||||
pass
|
||||
|
||||
|
||||
class WSGIHandler(wsgi.WSGIHandler):
|
||||
def log_request(self, *args):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user