compat ConsumerSet should auto declare new queues

This commit is contained in:
Ask Solem 2011-07-18 16:38:40 +01:00
parent f4fea5d27c
commit e1b19b9566
1 changed files with 4 additions and 2 deletions

View File

@ -234,8 +234,10 @@ class ConsumerSet(messaging.Consumer):
return self.purge()
def add_consumer_from_dict(self, queue, **options):
queue = entry_to_queue(queue, **options)
self.queues.append(queue(self.channel))
queue = entry_to_queue(queue, **options)(self.channel)
if self.auto_declare:
queue.declare()
self.queues.append(queue)
return queue
def add_consumer(self, consumer):