Ask Solem 12 years ago
parent
commit
f9f2081a00
2 changed files with 4 additions and 3 deletions
  1. 2 2
      celery/app/base.py
  2. 2 1
      celery/worker/consumer.py

+ 2 - 2
celery/app/base.py

@@ -20,8 +20,8 @@ from functools import wraps
 
 try:
     from billiard import forking as _forking
-except ImportError:
-    _forking = None
+except ImportError:  # pragma: no cover
+    _forking = None  # noqa
 from billiard.util import register_after_fork
 from kombu.clocks import LamportClock
 from kombu.utils import cached_property

+ 2 - 1
celery/worker/consumer.py

@@ -453,7 +453,8 @@ class Consumer(object):
 
                 # fire any ready timers, this also returns
                 # the number of seconds until we need to fire timers again.
-                poll_timeout = fire_timers(propagate=errors) if scheduled else 1
+                poll_timeout = (fire_timers(propagate=errors) if scheduled
+                                else 1)
 
                 # We only update QoS when there is no more messages to read.
                 # This groups together qos calls, and makes sure that remote