浏览代码

Merge branch 'markhellewell/master'

Ask Solem 15 年之前
父节点
当前提交
face72e1fa
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 1 1
      celery/task/control.py
  2. 5 0
      celery/tests/test_task_control.py

+ 1 - 1
celery/task/control.py

@@ -60,7 +60,7 @@ def ping(destination=None, timeout=1, **kwargs):
     :keyword limit: Limit number of replies.
 
     """
-    return broadcast("ping", wait=True, destination=destination,
+    return broadcast("ping", reply=True, destination=destination,
                      timeout=timeout, **kwargs)
 
 

+ 5 - 0
celery/tests/test_task_control.py

@@ -48,6 +48,11 @@ class TestBroadcast(unittest.TestCase):
         control.revoke("foozbaaz")
         self.assertIn("revoke", MockBroadcastPublisher.sent)
 
+    @with_mock_broadcast
+    def test_ping(self):
+        control.ping()
+        self.assertIn("ping", MockBroadcastPublisher.sent)
+
     @with_mock_broadcast
     def test_revoke_from_result(self):
         from celery.result import AsyncResult