Celery: Monitoring
Learn how to monitor the tasks in Celery.
We'll cover the following
Celery comes with a lot of monitoring tools built in, and this allows you to supervise things and get information about what is going on inside the cluster. This also makes it a great option over a custom built solution where all of this would have to be implemented again.
Note: The example in this lesson assumes that you have a Redis server. We already run a Redis server as a daemon when Run is clicked on a widget so you do not need to worry about starting the server yourself.
Status
To run the following application, enter command
python celery-task-queue.py
, then open another terminal and enter commandcd examples/queue-based-distribution/
to move to the relevant directory. Then, enter the command:celery -A celery-task-queue worker --queues celery,low-priority
. The program will keep waiting until the worker is started. Now, open yet another terminal and enter commandcd examples/queue-based-distribution/
and then entercelery -A celery-task-queue status
as the basic monitoring command isstatus
, which returns the state of the workers.
Get hands-on with 1400+ tech skills courses.