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:
Paul J. Davis 2010-11-15 21:37:15 -05:00
parent 5e83c3c704
commit e591059358

View File

@ -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")