Monitoring Celery
When our code is pushed to the server, our Celery
worker will not be run in the terminal window, it will be run as a background task. Because of this, Celery provides many command-line arguments to monitor the status of your Celery
worker and tasks. These commands take the following form:
$ celery –A celery_runner <command>
The main tasks to view the status of your workers are as follows:
status
: This prints the running workers and if they are upresult
: When passed a task id, this shows the return value and final status of the taskpurge
: Using this, all messages in the broker will be deletedinspect active
: This lists all active tasksinspect scheduled
: This lists all tasks that have been scheduled with theeta
argumentinspect registered ...
Get Mastering Flask now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.