I Have add some wrong task
to a celery
with redis broker
but now I want to remove the incorrect task
and I can't find any way to do this
Is there some commands or some api to do this ?
A common message broker that is used with celery is Redis which is a performant, in memory, key-value data store. Specifically, Redis is used to store messages produced by the application code describing the work to be done in the Celery task queue.
Save this answer. Show activity on this post. celery beats only trigger those 1000 tasks (by the crontab schedule), not run them. If you want to run 1000 tasks in parallel, you should have enough celery workers available to run those tasks.
You can write a Django management command to restart the Celery workers and then hook that command into Django's autoreload utility. Now if you run the Django custom command, the worker should restart automatically when the Django autoreload utility is triggered on changes to the codebase.
I know two ways of doing so:
1) Delete queue directly from broker. In your case it's Redis. There are two commands that could help you: llen (to find right queue) and del (to delete it).
2) Start celery worker with --purge or --discard options. Here is help:
--purge, --discard Purges all waiting tasks before the daemon is started.
**WARNING**: This is unrecoverable, and the tasks will
be deleted from the messaging server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With