Reputation: 475
I've a Celery App which is using redis as a broker and I can fetch the stats of the app using the below command
celery -A test.celeryapp inspect stats
This is giving me some numbers like below
"total": {
"test.celerytasks._generate_data": 14493666,
"test.celerytasks.cleanup_data": 14493,
}
Are these numbers describe that these tasks got executed this many number of times from day1? How to understand these results
How should I get the number of celery tasks which were processed in the last 1 hour/day? Can I get the list of expired tasks in the last one hour/day?
Is there any feasibility to achieve this?
Upvotes: 0
Views: 281
Reputation: 15926
Are these numbers describe that these tasks got executed this many number of times from day1? How to understand these results.
These numbers are the total from the last time celery was restarted. Essentially, each worker on each node keeps track of its own stats per task and then reports that back to the inspect command, which will then aggregate the results.
How should I get the number of celery tasks which were processed in the last 1 hour/day? Can I get the list of expired tasks in the last one hour/day?
You can run flower in persistent mode and check the saved state db
Upvotes: 1