From 1ccd6a9c5d2369073294b1f0d7d3293f79f8c6bc Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Wed, 22 Oct 2014 18:09:00 -0400 Subject: [PATCH] Change the max_instances for the workers to only allow one parallel job execution. --- workers/worker.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/workers/worker.py b/workers/worker.py index 03066dc6e..1442195ce 100644 --- a/workers/worker.py +++ b/workers/worker.py @@ -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)