Browse Source

reorder args to be more backward compatible

Sergey Tikhonov 9 năm trước cách đây
mục cha
commit
1919256eb5
1 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 5 5
      celery/events/__init__.py

+ 5 - 5
celery/events/__init__.py

@@ -216,8 +216,8 @@ class EventDispatcher(object):
                 raise
                 raise
             self._outbound_buffer.append((event, routing_key, exc))
             self._outbound_buffer.append((event, routing_key, exc))
 
 
-    def send(self, type, retry=False, retry_policy=None, blind=False,
-             Event=Event, utcoffset=utcoffset, **fields):
+    def send(self, type, blind=False, utcoffset=utcoffset, retry=False,
+             retry_policy=None, Event=Event, **fields):
         """Send event.
         """Send event.
 
 
         :param type: Event type name, with group separated by dash (`-`).
         :param type: Event type name, with group separated by dash (`-`).
@@ -248,9 +248,9 @@ class EventDispatcher(object):
                 elif self.on_send_buffered:
                 elif self.on_send_buffered:
                     self.on_send_buffered()
                     self.on_send_buffered()
             else:
             else:
-                return self.publish(type, fields, self.producer, retry=retry,
-                                    retry_policy=retry_policy, blind=blind,
-                                    Event=Event)
+                return self.publish(type, fields, self.producer, blind=blind,
+                                    Event=Event, retry=retry,
+                                    retry_policy=retry_policy)
 
 
     def flush(self, errors=True, groups=True):
     def flush(self, errors=True, groups=True):
         """Flushes the outbound buffer."""
         """Flushes the outbound buffer."""