Create dynamic queues with Celery Create dynamic queues with Celery flask flask

Create dynamic queues with Celery


http://docs.celeryproject.org/en/latest/userguide/workers.html#queues

celery -A proj control add_consumer foo -d worker1.local

The same can be accomplished dynamically using the app.control.add_consumer() method:

app.control.add_consumer('foo', reply=True)[{u'worker1.local': {u'ok': u"already consuming from u'foo'"}}]app.control.add_consumer('foo', reply=True,destination=['worker1@example.com'])


You can dynamically assign a task to a Queue at runtime when invoking it refer calling.html#routing-options. This would work if you have CELERY_CREATE_MISSING_QUEUES enabled.