Change the max_instances for the workers to only allow one parallel job execution.
This commit is contained in:
parent
ea96dbb2ad
commit
1ccd6a9c5d
1 changed files with 5 additions and 3 deletions
|
@ -171,9 +171,11 @@ class Worker(object):
|
|||
|
||||
self._sched.start()
|
||||
self._sched.add_job(self.poll_queue, 'interval', seconds=self._poll_period_seconds,
|
||||
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)
|
||||
start_date=soon, max_instances=1)
|
||||
self._sched.add_job(self.update_queue_metrics, 'interval', seconds=60, start_date=soon,
|
||||
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.SIGINT, self.terminate)
|
||||
|
|
Reference in a new issue