mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Set the number of workers to zero on WINCH.
We need to update the number of workers so they aren't restarted the next time the arbiter wakes up and runs manage_workers. Also fixed a typo for the log statement. Thanks to Randall Leeds for the report and patch.
This commit is contained in:
parent
5e83c3c704
commit
e591059358
@ -251,7 +251,8 @@ class Arbiter(object):
|
||||
def handle_winch(self):
|
||||
"SIGWINCH handling"
|
||||
if os.getppid() == 1 or os.getpgrp() != os.getpid():
|
||||
self.logger.info("graceful stop of workers")
|
||||
self.log.info("graceful stop of workers")
|
||||
self.num_workers = 0
|
||||
self.kill_workers(signal.SIGQUIT)
|
||||
else:
|
||||
self.log.info("SIGWINCH ignored. Not daemonized")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user