Merge "Cleanly shutdown zuul scheduler if startup fails"
This commit is contained in:
commit
985bb44679
|
@ -159,6 +159,7 @@ class Scheduler(zuul.cmd.ZuulDaemonApp):
|
|||
self.log.exception("Error starting Zuul:")
|
||||
# TODO(jeblair): If we had all threads marked as daemon,
|
||||
# we might be able to have a nicer way of exiting here.
|
||||
self.sched.stop()
|
||||
sys.exit(1)
|
||||
|
||||
signal.signal(signal.SIGHUP, self.reconfigure_handler)
|
||||
|
|
|
@ -231,6 +231,7 @@ class Scheduler(threading.Thread):
|
|||
self.statsd = get_statsd(config)
|
||||
self.rpc = rpclistener.RPCListener(config, self)
|
||||
self.stats_thread = threading.Thread(target=self.runStats)
|
||||
self.stats_thread.daemon = True
|
||||
self.stats_stop = threading.Event()
|
||||
# TODO(jeblair): fix this
|
||||
# Despite triggers being part of the pipeline, there is one trigger set
|
||||
|
|
Loading…
Reference in New Issue