Преглед на файлове

Tests passing on Python 2.5

Ask Solem преди 13 години
родител
ревизия
0d17a9feb4
променени са 1 файла, в които са добавени 7 реда и са изтрити 4 реда
  1. 7 4
      celery/bin/celery.py

+ 7 - 4
celery/bin/celery.py

@@ -482,9 +482,10 @@ class _RemoteControl(Command):
         except AttributeError:
             handler = self.call
 
-        replies = handler(method, *args[1:],
-                          timeout=timeout, destination=destination,
-                          callback=self.say_remote_command_reply)
+        # XXX Python 2.5 does not support X(*args, foo=1)
+        kwargs = {"timeout": timeout, "destination": destination,
+                  "callback": self.say_remote_command_reply}
+        replies = handler(method, *args[1:], **kwargs)
         if not replies:
             raise Error('No nodes replied within time constraint.',
                         status=EX_UNAVAILABLE)
@@ -564,7 +565,9 @@ class control(_RemoteControl):
     }
 
     def call(self, method, *args, **options):
-        return getattr(self.app.control, method)(*args, reply=True, **options)
+        # XXX Python 2.5 doesn't support X(*args, reply=True, **kwargs)
+        return getattr(self.app.control, method)(
+                *args, **dict(options, retry=True))
 
     def pool_grow(self, method, n=1, **kwargs):
         """[N=1]"""