Browse Source

Fixes merge

Ask Solem 13 năm trước cách đây
mục cha
commit
04a5f5017c

+ 4 - 5
celery/result.py

@@ -56,15 +56,14 @@ class AsyncResult(object):
         """Forget about (and possibly remove the result of) this task."""
         """Forget about (and possibly remove the result of) this task."""
         self.backend.forget(self.task_id)
         self.backend.forget(self.task_id)
 
 
-    def revoke(self, connection=None, connect_timeout=None):
+    def revoke(self, connection=None):
         """Send revoke signal to all workers.
         """Send revoke signal to all workers.
 
 
         Any worker receiving the task, or having reserved the
         Any worker receiving the task, or having reserved the
         task, *must* ignore it.
         task, *must* ignore it.
 
 
         """
         """
-        self.app.control.revoke(self.task_id, connection=connection,
-                                connect_timeout=connect_timeout)
+        self.app.control.revoke(self.task_id, connection=connection)
 
 
     def get(self, timeout=None, propagate=True, interval=0.5):
     def get(self, timeout=None, propagate=True, interval=0.5):
         """Wait until task is ready, and return its result.
         """Wait until task is ready, and return its result.
@@ -291,9 +290,9 @@ class ResultSet(object):
         for result in self.results:
         for result in self.results:
             result.forget()
             result.forget()
 
 
-    def revoke(self, connection=None, connect_timeout=None):
+    def revoke(self, connection=None):
         """Revoke all tasks in the set."""
         """Revoke all tasks in the set."""
-        with self.app.default_connection(connection, connect_timeout) as conn:
+        with self.app.default_connection(connection) as conn:
             for result in self.results:
             for result in self.results:
                 result.revoke(connection=conn)
                 result.revoke(connection=conn)
 
 

+ 1 - 1
celery/tests/test_app/test_loaders.py

@@ -109,7 +109,7 @@ class TestLoaderBase(Case):
         modnames = lambda l: [m.__name__ for m in l]
         modnames = lambda l: [m.__name__ for m in l]
         self.assertEqual(sorted(modnames(
         self.assertEqual(sorted(modnames(
                             self.loader.import_default_modules())),
                             self.loader.import_default_modules())),
-                         sorted(modnames([os, sys, task])))
+                         sorted(modnames([os, sys])))
 
 
     def test_import_from_cwd_custom_imp(self):
     def test_import_from_cwd_custom_imp(self):