python - setting celery queues in django: unable to specify queues in settings.py -


i have following settings in django project's settings.py:

celery_broker_url = get_redis_url_with_db(1) celery_accept_content = ['json', 'pickle'] celery_task_serializer = 'pickle' celery_result_serializer = 'pickle' celery_beat_schedule = {     'repush-countries-to-outs': {         'task': 'data.tasks.repush_countries_to_outs',         'schedule': timedelta(minutes=10),     } } 

and works expected.

but when add queue configuration:

celery_routes = {     'data.tasks.retry_fetching_out': {         'queue': 'fetch_outs'     } } 

and restart celery -q fetch_outs setting, task retry_fetching_out ignored workers.

however, when put same configutation in celery object so:

app = celery('sourcery')  app.config_from_object('django.conf:settings', namespace='celery')  app.conf.task_routes = {     'data.tasks.retry_fetching_out': {         'queue': 'fetch_outs'     } } 

it starts working. retry_fetching_out tasks picked workers fetch_outs queue.

what's wrong first way?


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -