Browse Source

Merge pull request #2884 from rutube/master

Make EventDispatcher.send consistent with its docstring
Ask Solem Hoel 9 years ago
parent
commit
e08d1e025d
1 changed files with 5 additions and 2 deletions
  1. 5 2
      celery/events/__init__.py

+ 5 - 2
celery/events/__init__.py

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