Browse Source

The Mediator thread should not block for more than 1 second.

Ask Solem 15 years ago
parent
commit
00524d6b35
1 changed files with 1 additions and 1 deletions
  1. 1 1
      celery/worker/buckets.py

+ 1 - 1
celery/worker/buckets.py

@@ -124,7 +124,7 @@ class TaskBucket(object):
             if remaining_time:
                 if not block or did_timeout():
                     raise QueueEmpty
-                time.sleep(remaining_time)
+                time.sleep(min(remaining_time, timeout or 1))
             else:
                 return item