Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Celery: list all tasks, scheduled, active *and* finished

Tags:

Update for the bounty

I'd like a solution that does not involve a monitoring thread, if possible.


I know I can view scheduled and active tasks using the Inspect class of my apps Control.

i = myapp.control.inspect()  currently_running = i.active() scheduled = i.scheduled() 

But I could not find any function to show already finished tasks. I know that this information mus be at least temporarily accessible, because I can look up a finished task by its task_id:

>>> r = my task.AsyncResult(task_id=' ... ') >>> r.state u'SUCCESS' 

How can I get a complete list of scheduled, active and finished tasks? Or possibly a list of all tasks at once?

like image 490
Constantinius Avatar asked Sep 06 '12 12:09

Constantinius


1 Answers

Celery Flower shows tasks (active, finished, reserved, etc) in real time. It enables to filter tasks by time, workers and types.

https://github.com/mher/flower

like image 54
mher Avatar answered Sep 22 '22 06:09

mher