5

Sometimes I have a situation where Celery queue builds up on accidental unnecessary tasks, clogging down the server. E.g. the code shoots up 20 000 tasks instead of 1.

How one can inspect what Python tasks Celery queue contains and then get selectively rid of certain tasks?

Tasks are defined and started with the standard Celery decorators (if that matters):

@task()
def update_foobar(foo, bar):
    # Some heavy activon here
    pass

update_foobar.delay(foo, bar)

Stack: Django + Celery + RabbitMQ.

1 Answer 1

2
+50

Maybe you can use Flower. It's a real time monitor for Celery with a nice web interface. I think you can shutdown tasks from there. Anyways I would try to avoid those queued unnecessary tasks.

Sign up to request clarification or add additional context in comments.

1 Comment

I'll give you the bounty as it is about to expire, though I was more looking for a comnmand line solution, without needing to install an extra software.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.