Fix graceful exit

When the gearman server was added, the exit handler was not updated
correctly.  It should tell the scheduler to exit, wait for the
scheduler to empty its pipelines, and then kill the gearman server
and exit.

Change-Id: Ie0532c2ea058ed56217e41641f8eec45080a9470
This commit is contained in:
James E. Blair
2013-08-26 17:05:00 -07:00
parent 96ee718c4b
commit 6767905a47

View File

@@ -103,8 +103,9 @@ class Server(object):
def exit_handler(self, signum, frame):
signal.signal(signal.SIGUSR1, signal.SIG_IGN)
self.stop_gear_server()
self.sched.exit()
self.sched.join()
self.stop_gear_server()
def term_handler(self, signum, frame):
self.stop_gear_server()