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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -