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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user