mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
do the same for others.
This commit is contained in:
parent
c41d3edd36
commit
5c498b6a89
@ -122,19 +122,15 @@ class GeventBaseWorker(Worker):
|
|||||||
|
|
||||||
if self.ppid != os.getppid():
|
if self.ppid != os.getppid():
|
||||||
self.log.info("Parent changed, shutting down: %s" % self)
|
self.log.info("Parent changed, shutting down: %s" % self)
|
||||||
server.stop()
|
|
||||||
break
|
break
|
||||||
gevent.sleep(0.1)
|
gevent.sleep(0.1)
|
||||||
except KeyboardInterrupt:
|
|
||||||
pass
|
|
||||||
|
|
||||||
server.stop(timeout=self.timeout)
|
self.notify()
|
||||||
|
server.stop(timeout=self.timeout)
|
||||||
def handle_request(self, *args):
|
|
||||||
try:
|
|
||||||
super(GeventBaseWorker, self).handle_request(*args)
|
|
||||||
except gevent.GreenletExit:
|
except gevent.GreenletExit:
|
||||||
pass
|
pass
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class WSGIHandler(wsgi.WSGIHandler):
|
class WSGIHandler(wsgi.WSGIHandler):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user