Ask Solem 13 лет назад
Родитель
Сommit
6bde4b9e48

+ 1 - 0
celery/concurrency/eventlet.py

@@ -102,6 +102,7 @@ class Timer(timer2.Timer):
 class TaskPool(base.BasePool):
 class TaskPool(base.BasePool):
     Timer = Timer
     Timer = Timer
 
 
+    rlimit_safe = False
     signal_safe = False
     signal_safe = False
     is_green = True
     is_green = True
 
 

+ 1 - 1
celery/worker/__init__.py

@@ -269,7 +269,7 @@ class WorkController(configurated):
             self._shutdown(warm=False)
             self._shutdown(warm=False)
 
 
     def _shutdown(self, warm=True):
     def _shutdown(self, warm=True):
-        what = (warm and "stopping" or "terminating").capitalize()
+        what = "Stopping" if warm else "Terminating"
 
 
         if self._state in (self.CLOSE, self.TERMINATE):
         if self._state in (self.CLOSE, self.TERMINATE):
             return
             return

+ 3 - 2
celery/worker/mediator.py

@@ -35,8 +35,9 @@ class WorkerComponent(StartStopComponent):
 
 
     def __init__(self, w, **kwargs):
     def __init__(self, w, **kwargs):
         w.mediator = None
         w.mediator = None
-        if w.disable_rate_limits and not w.pool_cls.requires_mediator:
+
-            self.enabled = False
+    def include_if(self, w):
+        return not w.disable_rate_limits or w.pool_cls.requires_mediator
 
 
     def create(self, w):
     def create(self, w):
         m = w.mediator = self.instantiate(w.mediator_cls, w.ready_queue,
         m = w.mediator = self.instantiate(w.mediator_cls, w.ready_queue,

+ 1 - 1
docs/getting-started/brokers/django.rst

@@ -23,7 +23,7 @@ configuration values.
 
 
 #. Add :mod:`django.transport.kombu` to `INSTALLED_APPS`::
 #. Add :mod:`django.transport.kombu` to `INSTALLED_APPS`::
 
 
-    INSTALLED_APPS = ("django.transport.kombu", )
+    INSTALLED_APPS = ("kombu.transport.django", )
 
 
 #. Verify your database settings::
 #. Verify your database settings::