scheduler: call stop on SIGTERM

This change attempst to cleanly stop the scheduler when
the service receive a SIGTERM.

Change-Id: I9f8ccb9aa5f8bd998639919d760aafd8a8b47aa5
This commit is contained in:
Tristan Cacqueray 2021-06-01 19:48:34 +00:00
parent 7b623a99ba
commit 6eb2a3eb31
1 changed files with 1 additions and 0 deletions

View File

@ -71,6 +71,7 @@ class Scheduler(zuul.cmd.ZuulDaemonApp):
self.log.exception("Reconfiguration failed:")
def exit_handler(self, signum, frame):
self.sched.stop()
self.sched.join()
self.stop_gear_server()
sys.exit(0)