From e8c1885eda7c36eaf570e3ee5649a84d34833122 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Fri, 15 Feb 2013 08:49:18 +0100 Subject: [PATCH] Avoid negative timeouts when default_worker_ttl is < 60. --- rq/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rq/worker.py b/rq/worker.py index 7f3cd0ac..4dd28747 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -306,7 +306,7 @@ class Worker(object): self.log.info('') self.log.info('*** Listening on %s...' % \ green(', '.join(qnames))) - timeout = None if burst else self.default_worker_ttl - 60 + timeout = None if burst else max(1, self.default_worker_ttl - 60) try: result = self.dequeue_job_and_maintain_ttl(timeout) if result is None: