diff options
author | Alex Koshelev <daevaorn@gmail.com> | 2014-03-02 21:19:13 +0400 |
---|---|---|
committer | Alex Koshelev <daevaorn@gmail.com> | 2014-03-02 21:19:13 +0400 |
commit | f57a8d70927d52ea42ab6528745eb65e33a3d8b9 (patch) | |
tree | fe6e8b1c8838af2ad25478bdeb665ffb9ca18d92 /kombu/transport/mongodb.py | |
parent | 32bab847775b612903d6605a364d7efd7e8815dc (diff) | |
download | kombu-f57a8d70927d52ea42ab6528745eb65e33a3d8b9.tar.gz |
Comments added
Diffstat (limited to 'kombu/transport/mongodb.py')
-rw-r--r-- | kombu/transport/mongodb.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kombu/transport/mongodb.py b/kombu/transport/mongodb.py index 8b3cb7dc..f6362190 100644 --- a/kombu/transport/mongodb.py +++ b/kombu/transport/mongodb.py @@ -31,6 +31,8 @@ DEFAULT_BROADCAST_COLLECTION = 'messages.broadcast' class BroadcastCursor(object): + '''Cursor for broadcast queues.''' + def __init__(self, cursor): # Fast forward the cursor past old events self._cursor = cursor.skip(cursor.count()) @@ -246,6 +248,9 @@ class Channel(virtual.Channel): try: return self._broadcast_cursors[queue] except KeyError: + # Cursor may be absent when Channel created more than one time. + # _fanout_queues is the class-level mutable attrbite so it is shared over all + # Channel instances. return self.create_broadcast_cursor(self._fanout_queues[queue], None, None, queue) def create_broadcast_cursor(self, exchange, routing_key, pattern, queue): |