Tuesday, January 25, 2011

Celery v2.0 versus Celery v1.06

Celery v1.06 doesn't have support for the queue= keyword. You may try to dispatch a call (i.e. function.apply_async(kwargs={'arg1' : arg1}, queue='queue-low-priority'), but it may be still sent through the default queue. The issue is that v1.06 doesn't have support for this keyword argument. The solution? Upgrade to Celery v2.0!

celery/execute/__init__.py:
extract_exec_options = mattrgetter("routing_key", "exchange",
                                   "immediate", "mandatory",
                                   "priority", "serializer",
                                   "delivery_mode")

http://celeryproject.org/docs/changelog.html#version-1-0-6

celery/execute/__init__.py (v1.0.6):
extract_exec_options = mattrgetter("routing_key", "exchange",
                                   "immediate", "mandatory",
                                   "priority", "serializer",
                                   "delivery_mode")
celery/execute/__init__.py (v2.0.0):
extract_exec_options = mattrgetter("queue", "routing_key", "exchange",
                                   "immediate", "mandatory",
                                   "priority", "serializer",
                                   "delivery_mode")

http://celeryproject.org/docs/changelog.html#version-1-0-
New Task option: Task.queue

If set, message options will be taken from the corresponding entry inCELERY_QUEUES. exchange, exchange_type and routing_key will be ignored

No comments:

Post a Comment