From df14acaf02add78a828c4acb7c97db1dc537c6f5 Mon Sep 17 00:00:00 2001 From: Selwin Ong Date: Tue, 20 Oct 2020 07:12:31 +0700 Subject: [PATCH] Increase scheduler lock TTL to 60 (#1362) --- rq/scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rq/scheduler.py b/rq/scheduler.py index 4d84b48..1be2e29 100644 --- a/rq/scheduler.py +++ b/rq/scheduler.py @@ -85,7 +85,7 @@ class RQScheduler(object): pid = os.getpid() logger.info("Trying to acquire locks for %s", ", ".join(self._queue_names)) for name in self._queue_names: - if self.connection.set(self.get_locking_key(name), pid, nx=True, ex=5): + if self.connection.set(self.get_locking_key(name), pid, nx=True, ex=60): successful_locks.add(name) # Always reset _scheduled_job_registries when acquiring locks