Avoid negative timeouts when default_worker_ttl is < 60.

This commit is contained in:
Vincent Driessen 2013-02-15 08:49:18 +01:00
parent 640195d5e4
commit e8c1885eda
1 changed files with 1 additions and 1 deletions

View File

@ -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: