mirror of https://github.com/celery/kombu.git
exchange argument to publish can now be an Exchange
This commit is contained in:
parent
f7a6a4c171
commit
ad30cddd34
|
@ -120,6 +120,9 @@ class Producer(object):
|
|||
if compression is None:
|
||||
compression = self.compression
|
||||
|
||||
if isinstance(exchange, Exchange):
|
||||
exchange = exchange.name
|
||||
|
||||
body, content_type, content_encoding = self._prepare(
|
||||
body, serializer, content_type, content_encoding,
|
||||
compression, headers)
|
||||
|
@ -281,6 +284,8 @@ class Consumer(object):
|
|||
"""Register consumer on server.
|
||||
|
||||
"""
|
||||
if not self.queues:
|
||||
return
|
||||
if no_ack is None:
|
||||
no_ack = self.no_ack
|
||||
H, T = self.queues[:-1], self.queues[-1]
|
||||
|
|
Loading…
Reference in New Issue