Sfoglia il codice sorgente

celery.concurrency.[evlet|gevent] renamed -> eventlet, gevent

Ask Solem 13 anni fa
parent
commit
b605ec1b6e

+ 2 - 2
celery/concurrency/__init__.py

@@ -4,8 +4,8 @@ from ..utils import get_cls_by_name
 
 
 ALIASES = {
 ALIASES = {
     "processes": "celery.concurrency.processes.TaskPool",
     "processes": "celery.concurrency.processes.TaskPool",
-    "eventlet": "celery.concurrency.evlet.TaskPool",
-    "gevent": "celery.concurrency.evg.TaskPool",
+    "eventlet": "celery.concurrency.eventlet.TaskPool",
+    "gevent": "celery.concurrency.gevent.TaskPool",
     "threads": "celery.concurrency.threads.TaskPool",
     "threads": "celery.concurrency.threads.TaskPool",
     "solo": "celery.concurrency.solo.TaskPool",
     "solo": "celery.concurrency.solo.TaskPool",
 }
 }

+ 0 - 0
celery/concurrency/evlet.py → celery/concurrency/eventlet.py


+ 0 - 0
celery/concurrency/evg.py → celery/concurrency/gevent.py


+ 4 - 4
celery/signals.py

@@ -223,7 +223,7 @@ eventlet_pool_started
 
 
 Sent when the eventlet pool has been started.
 Sent when the eventlet pool has been started.
 
 
-Sender is the :class:`celery.concurrency.evlet.TaskPool` instance.
+Sender is the :class:`celery.concurrency.eventlet.TaskPool` instance.
 
 
 .. signal:: eventlet_pool_preshutdown
 .. signal:: eventlet_pool_preshutdown
 
 
@@ -233,7 +233,7 @@ eventlet_pool_preshutdown
 Sent when the worker shutdown, just before the eventlet pool
 Sent when the worker shutdown, just before the eventlet pool
 is requested to wait for remaining workers.
 is requested to wait for remaining workers.
 
 
-Sender is the :class:`celery.concurrency.evlet.TaskPool` instance.
+Sender is the :class:`celery.concurrency.eventlet.TaskPool` instance.
 
 
 .. signal:: eventlet_pool_postshutdown
 .. signal:: eventlet_pool_postshutdown
 
 
@@ -242,7 +242,7 @@ eventlet_pool_postshutdown
 
 
 Sent when the pool has been joined and the worker is ready to shutdown.
 Sent when the pool has been joined and the worker is ready to shutdown.
 
 
-Sender is the :class:`celery.concurrency.evlet.TaskPool` instance.
+Sender is the :class:`celery.concurrency.eventlet.TaskPool` instance.
 
 
 .. signal:: eventlet_pool_apply
 .. signal:: eventlet_pool_apply
 
 
@@ -251,7 +251,7 @@ eventlet_pool_apply
 
 
 Sent whenever a task is applied to the pool.
 Sent whenever a task is applied to the pool.
 
 
-Sender is the :class:`celery.concurrency.evlet.TaskPool` instance.
+Sender is the :class:`celery.concurrency.eventlet.TaskPool` instance.
 
 
 Provides arguments:
 Provides arguments:
 
 

+ 4 - 4
celery/tests/test_concurrency/test_concurrency_evlet.py → celery/tests/test_concurrency/test_concurrency_eventlet.py

@@ -22,13 +22,13 @@ class test_eventlet_patch(EventletCase):
         monkey_patched = []
         monkey_patched = []
         prev_monkey_patch = self.eventlet.monkey_patch
         prev_monkey_patch = self.eventlet.monkey_patch
         self.eventlet.monkey_patch = lambda: monkey_patched.append(True)
         self.eventlet.monkey_patch = lambda: monkey_patched.append(True)
-        prev_evlet = sys.modules.pop("celery.concurrency.evlet", None)
+        prev_evlet = sys.modules.pop("celery.concurrency.eventlet", None)
         os.environ.pop("EVENTLET_NOPATCH")
         os.environ.pop("EVENTLET_NOPATCH")
         try:
         try:
-            from celery.concurrency import evlet
-            self.assertTrue(evlet)
+            from celery.concurrency import eventlet
+            self.assertTrue(eventlet)
             self.assertTrue(monkey_patched)
             self.assertTrue(monkey_patched)
         finally:
         finally:
-            sys.modules["celery.concurrency.evlet"] = prev_evlet
+            sys.modules["celery.concurrency.eventlet"] = prev_eventlet
             os.environ["EVENTLET_NOPATCH"] = "yes"
             os.environ["EVENTLET_NOPATCH"] = "yes"
             self.eventlet.monkey_patch = prev_monkey_patch
             self.eventlet.monkey_patch = prev_monkey_patch

+ 1 - 1
celery/worker/__init__.py

@@ -254,7 +254,7 @@ class WorkController(object):
             self.terminate()
             self.terminate()
             raise
             raise
         except SystemExit, e:
         except SystemExit, e:
-            self.terminate()
+            self.stop()
         except:
         except:
             self.stop()
             self.stop()
             try:
             try:

+ 3 - 3
docs/internals/reference/celery.concurrency.evg.rst → docs/internals/reference/celery.concurrency.eventlet.rst

@@ -1,11 +1,11 @@
 =============================================================
 =============================================================
- celery.concurrency.evg† (*experimental*)
+ celery.concurrency.eventlet† (*experimental*)
 =============================================================
 =============================================================
 
 
 .. contents::
 .. contents::
     :local:
     :local:
-.. currentmodule:: celery.concurrency.evg
+.. currentmodule:: celery.concurrency.eventlet
 
 
-.. automodule:: celery.concurrency.evg
+.. automodule:: celery.concurrency.eventlet
     :members:
     :members:
     :undoc-members:
     :undoc-members:

+ 3 - 3
docs/internals/reference/celery.concurrency.evlet.rst → docs/internals/reference/celery.concurrency.gevent.rst

@@ -1,11 +1,11 @@
 =============================================================
 =============================================================
- celery.concurrency.evlet† (*experimental*)
+ celery.concurrency.gevent† (*experimental*)
 =============================================================
 =============================================================
 
 
 .. contents::
 .. contents::
     :local:
     :local:
-.. currentmodule:: celery.concurrency.evlet
+.. currentmodule:: celery.concurrency.gevent
 
 
-.. automodule:: celery.concurrency.evlet
+.. automodule:: celery.concurrency.gevent
     :members:
     :members:
     :undoc-members:
     :undoc-members:

+ 2 - 2
docs/internals/reference/index.rst

@@ -20,8 +20,8 @@
     celery.concurrency.solo
     celery.concurrency.solo
     celery.concurrency.processes
     celery.concurrency.processes
     celery.concurrency.processes.pool
     celery.concurrency.processes.pool
-    celery.concurrency.evlet
-    celery.concurrency.evg
+    celery.concurrency.eventlet
+    celery.concurrency.gevent
     celery.concurrency.base
     celery.concurrency.base
     celery.concurrency.threads
     celery.concurrency.threads
     celery.beat
     celery.beat

+ 1 - 1
setup.cfg

@@ -23,7 +23,7 @@ cover3-exclude = celery
                  celery.contrib*
                  celery.contrib*
                  celery.concurrency.threads
                  celery.concurrency.threads
                  celery.concurrency.processes.pool
                  celery.concurrency.processes.pool
-                 celery.concurrency.evg
+                 celery.concurrency.gevent
                  celery.backends.mongodb
                  celery.backends.mongodb
                  celery.backends.tyrant
                  celery.backends.tyrant
                  celery.backends.cassandra
                  celery.backends.cassandra