Skip to content

Commit 2b3aef9

Browse files
author
Chris Jones
committed
Allow us to set the transport_options for kombu. I can then override max_connections as used by the kombu redis transport.
1 parent 2d39058 commit 2b3aef9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

socketio/kombu_manager.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@ class KombuManager(PubSubManager): # pragma: no cover
3838
name = 'kombu'
3939

4040
def __init__(self, url='amqp://guest:guest@localhost:5672//',
41-
channel='socketio', write_only=False):
41+
channel='socketio', write_only=False, transport_options=None):
4242
if kombu is None:
4343
raise RuntimeError('Kombu package is not installed '
4444
'(Run "pip install kombu" in your '
4545
'virtualenv).')
4646
super(KombuManager, self).__init__(channel=channel)
47+
self.transport_options = transport_options
4748
self.url = url
48-
self.writer_conn = kombu.Connection(self.url)
49+
self.writer_conn = kombu.Connection(self.url,
50+
transport_options=transport_options)
4951
self.writer_queue = self._queue(self.writer_conn)
5052

5153
def _queue(self, conn=None):

0 commit comments

Comments
 (0)