소스 검색

Fixes merge

Ask Solem 14 년 전
부모
커밋
04a5f5017c
2개의 변경된 파일과 5개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 5
      celery/result.py
  2. 1 1
      celery/tests/test_app/test_loaders.py

+ 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):