ninjacoder
ninjacoder

Reputation: 293

Django Celery how to configure queues and see them in rabbitmq admin dashboard

In my config files I have the following lines:

CELERY_QUEUES = (
    Queue('fetch_tweets_requests'),
)

CELERY_ROUTES = {
    'applications.twitter.tasks.fetch_tweets': {'queue': 
    'fetch_tweets_requests' },
}

The tasks run as expected when fired, but when I go to the rabbitmq admin dashboard, I don't see any queue named fetch_tweets_requests How can I configure django so that I can see the queues I've setup?

Upvotes: 0

Views: 277

Answers (1)

ninjacoder
ninjacoder

Reputation: 293

I figured it out. It's because in the celery app I'd also configured it to namespace celery configs i.e.

app.config_from_object('django.conf:settings', namespace='CELERY')

So all I needed to do was make sure the settings abided by the namespace. i.e.

CELERY_CELERY_QUEUES = (
    Queue('fetch_tweets_requests'),
)

CELERY_CELERY_ROUTES = {
    'applications.twitter.tasks.fetch_tweets': {'queue': 
    'fetch_tweets_requests' },
}

Upvotes: 1

Related Questions