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

后端 未结 2 896
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-02 11:25

Update for the bounty

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


I know I can view scheduled an

2条回答
  •  悲&欢浪女
    2021-02-02 12:01

    One option not requiring a monitoring thread is a Celery on_success handler (using bootsteps feature in 3.1+) - this would need to write relevant info to your own datastore.

    • You need to create a custom task class to do this. This on_failure example gives an idea.

    Possibly better option, needing less code, is to use a task_success signal in a similar way, recording the info you need later.

    The Flower option is probably simpler, as you are querying info already maintained by Flower when tasks complete - see this answer.

提交回复
热议问题