Skip to content

Commit

Permalink
Fixed this really ugly bug: After renaming consumer routing_key to bi…
Browse files Browse the repository at this point in the history
…nding_key

we still need to rewrite it back to routing_key when we use it as an option in
carrot. This fixes the bug related to
http://stackoverflow.com/questions/2141083/rabbitmq-celery-with-django-hangs-on-delay-ready-etc-no-useful-log-info
  • Loading branch information
Ask Solem committed Jan 27, 2010
1 parent ca14eb2 commit a9c1316
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion celery/messaging.py
Expand Up @@ -151,4 +151,10 @@ def get_consumer_set(connection, queues=None, **options):
"""
queues = queues or conf.routing_table
return ConsumerSet(connection, from_dict=queues, **options)
cset = ConsumerSet(connection)
for queue_name, queue_options in queues.items():
queue_options["routing_key"] = queue_options.pop("binding_key", None)
consumer = Consumer(connection, queue=queue_name,
backend=cset.backend, **queue_options)
cset.consumers.append(consumer)
return cset

0 comments on commit a9c1316

Please sign in to comment.