mirror of https://github.com/celery/kombu.git
amqplib: Set connection.client
This commit is contained in:
parent
aad945d3a5
commit
501669fed3
|
@ -32,7 +32,7 @@ class SimpleBase(object):
|
||||||
self.buffer = deque()
|
self.buffer = deque()
|
||||||
self.consumer.register_callback(self._receive)
|
self.consumer.register_callback(self._receive)
|
||||||
|
|
||||||
def get(self, block=True, timeout=None, sync=False):
|
def get(self, block=True, timeout=None):
|
||||||
if not block:
|
if not block:
|
||||||
return self.get_nowait()
|
return self.get_nowait()
|
||||||
self._consume()
|
self._consume()
|
||||||
|
|
|
@ -210,13 +210,15 @@ class Transport(base.Transport):
|
||||||
raise KeyError("Missing password for AMQP connection.")
|
raise KeyError("Missing password for AMQP connection.")
|
||||||
if not conninfo.port:
|
if not conninfo.port:
|
||||||
conninfo.port = self.default_port
|
conninfo.port = self.default_port
|
||||||
return self.Connection(host=conninfo.host,
|
conn = self.Connection(host=conninfo.host,
|
||||||
userid=conninfo.userid,
|
userid=conninfo.userid,
|
||||||
password=conninfo.password,
|
password=conninfo.password,
|
||||||
virtual_host=conninfo.virtual_host,
|
virtual_host=conninfo.virtual_host,
|
||||||
insist=conninfo.insist,
|
insist=conninfo.insist,
|
||||||
ssl=conninfo.ssl,
|
ssl=conninfo.ssl,
|
||||||
connect_timeout=conninfo.connect_timeout)
|
connect_timeout=conninfo.connect_timeout)
|
||||||
|
conn.client = self.client
|
||||||
|
return conn
|
||||||
|
|
||||||
def close_connection(self, connection):
|
def close_connection(self, connection):
|
||||||
"""Close the AMQP broker connection."""
|
"""Close the AMQP broker connection."""
|
||||||
|
|
Loading…
Reference in New Issue