Increase scheduler lock TTL to 60 (#1362)

This commit is contained in:
Selwin Ong 2020-10-20 07:12:31 +07:00 committed by GitHub
parent 2da957a68d
commit df14acaf02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ class RQScheduler(object):
pid = os.getpid() pid = os.getpid()
logger.info("Trying to acquire locks for %s", ", ".join(self._queue_names)) logger.info("Trying to acquire locks for %s", ", ".join(self._queue_names))
for name in 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) successful_locks.add(name)
# Always reset _scheduled_job_registries when acquiring locks # Always reset _scheduled_job_registries when acquiring locks