소스 검색

Can now set connection for inspect: inspect(connection=conn)

Ask Solem 13 년 전
부모
커밋
7e74e9b614
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      celery/app/control.py

+ 4 - 1
celery/app/control.py

@@ -27,11 +27,13 @@ def flatten_reply(reply):
 
 class Inspect(object):
 
-    def __init__(self, control, destination=None, timeout=1, callback=None,):
+    def __init__(self, control, destination=None, timeout=1, callback=None,
+            connection=None):
         self.destination = destination
         self.timeout = timeout
         self.callback = callback
         self.control = control
+        self.connection = connection
 
     def _prepare(self, reply):
         if not reply:
@@ -47,6 +49,7 @@ class Inspect(object):
                                       arguments=kwargs,
                                       destination=self.destination,
                                       callback=self.callback,
+                                      connection=self.connection,
                                       timeout=self.timeout, reply=True))
 
     def report(self):