Browse Source

cosmetics

Ask Solem 12 years ago
parent
commit
ee554ef664
3 changed files with 6 additions and 5 deletions
  1. 1 0
      celery/concurrency/processes.py
  2. 1 1
      celery/worker/__init__.py
  3. 4 4
      celery/worker/loops.py

+ 1 - 0
celery/concurrency/processes.py

@@ -435,6 +435,7 @@ class TaskPool(BasePool):
         apply_at = hub.timer.apply_at
         maintain_pool = self.maintain_pool
         on_soft_timeout = self.on_soft_timeout
+        on_hard_timeout = self.on_hard_timeout
         fileno_to_inq = pool._fileno_to_inq
         fileno_to_outq = pool._fileno_to_outq
         fileno_to_synq = pool._fileno_to_synq

+ 1 - 1
celery/worker/__init__.py

@@ -80,6 +80,7 @@ class WorkController(configurated):
     pidlock = None
     namespace = None
     pool = None
+    semaphore = None
 
     class Namespace(bootsteps.Namespace):
         """Worker bootstep namespace."""
@@ -296,7 +297,6 @@ class WorkController(configurated):
             'nivcsw': s.ru_nivcsw,
         }
 
-
     def stats(self):
         info = self.info()
         info.update(self.namespace.info(self))

+ 4 - 4
celery/worker/loops.py

@@ -100,14 +100,14 @@ def asynloop(obj, connection, consumer, strategies, ns, hub, qos,
                     if not events:
                         conn_poll_empty()
                     for fileno, event in events or ():
-                        cb = flags = None
+                        cb = None
                         try:
                             if event & READ:
-                                cb, flags = readers[fileno], READ | ERR
+                                cb = readers[fileno]
                             elif event & WRITE:
-                                cb, flags = writers[fileno], WRITE
+                                cb = writers[fileno]
                             elif event & ERR:
-                                cb, flags = (readers.get(fileno) or
+                                cb = (readers.get(fileno) or
                                       writers.get(fileno))
                                 if cb is None:
                                     continue