Ask Your Question
1

How can I remove all the pending tasks in Celery and RabbitMQ?

asked 2023-03-29 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-09-12 03:00:00 +0000

lakamha gravatar image

To remove all the pending tasks in Celery and RabbitMQ, you can follow these steps:

  1. Stop Celery workers:

    celery multi stop <worker_name> -A <app_name>
    
  2. Purge the RabbitMQ queue:

    celery -A <app_name> purge
    

    This will remove all the messages from the RabbitMQ queue.

  3. Restart the Celery workers:

    celery multi start <worker_name> -A <app_name>
    

After following these steps, all the pending tasks in Celery and RabbitMQ should be removed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-03-29 11:00:00 +0000

Seen: 8 times

Last updated: Sep 12 '21