瀏覽代碼

inspect now supports limit argment: inspect(limit=1).ping()

Ask Solem 12 年之前
父節點
當前提交
25227917ec
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      celery/app/control.py

+ 3 - 1
celery/app/control.py

@@ -27,12 +27,13 @@ class Inspect(object):
     app = None
 
     def __init__(self, destination=None, timeout=1, callback=None,
-            connection=None, app=None):
+            connection=None, app=None, limit=None):
         self.app = app or self.app
         self.destination = destination
         self.timeout = timeout
         self.callback = callback
         self.connection = connection
+        self.limit = limit
 
     def _prepare(self, reply):
         if not reply:
@@ -49,6 +50,7 @@ class Inspect(object):
                                       destination=self.destination,
                                       callback=self.callback,
                                       connection=self.connection,
+                                      limit=self.limit,
                                       timeout=self.timeout, reply=True))
 
     def report(self):