This commit is contained in:
Joseph Schorr 2014-10-22 19:02:03 -04:00
commit 94c24a93c2

View file

@ -171,9 +171,11 @@ class Worker(object):
self._sched.start() self._sched.start()
self._sched.add_job(self.poll_queue, 'interval', seconds=self._poll_period_seconds, self._sched.add_job(self.poll_queue, 'interval', seconds=self._poll_period_seconds,
start_date=soon) start_date=soon, max_instances=1)
self._sched.add_job(self.update_queue_metrics, 'interval', seconds=60, start_date=soon) self._sched.add_job(self.update_queue_metrics, 'interval', seconds=60, start_date=soon,
self._sched.add_job(self.run_watchdog, 'interval', seconds=self._watchdog_period_seconds) max_instances=1)
self._sched.add_job(self.run_watchdog, 'interval', seconds=self._watchdog_period_seconds,
max_instances=1)
signal.signal(signal.SIGTERM, self.terminate) signal.signal(signal.SIGTERM, self.terminate)
signal.signal(signal.SIGINT, self.terminate) signal.signal(signal.SIGINT, self.terminate)