GrantU
GrantU

Reputation: 6555

Celery how to stop tasks being processed on a developnent machine

I have my production and development machines setup using Celery in Django. Everything works. My issue is that when I boot up my development machine it starts to consume tasks and if I have a bug (which I often do on my development version) this can give me lots of headaches.

I still want my development machine to send tasks to be consumed, but how do I stop it from processing tasks and leave just my production server for that?

PS, I don't want to have to remove celery setting on my development machine as I still want my dev one to send tasks to be consumed, if that makes sense.

These are my current settings...

Celery

BROKER_URL = 'amqp://admin:[email protected]:5672//'
CELERY_SEND_TASK_ERROR_EMAILS = True

I'm using RabbitMQ.

Upvotes: 2

Views: 389

Answers (1)

fundamol
fundamol

Reputation: 81

You can try:

celery purge

And if you have django-celery you can do

python manage.py celery purge

Upvotes: 1

Related Questions