The celery worker documentation explains the output of inspect
commands.
By default, using celery.current_app.control.inspect()
, an inspector object is returned that allows you to query the status of all workers. For example, if you are executing this code with two working workers with the names βadderβ and βsleepβ:
i = celery.current_app.control.inspect() i.registered()
calling i.registered()
might return something like:
{ ' adder@example.com ': ['tasks.add'], ' sleeper@example.com ': ['tasks.sleeptask'], }
In conclusion, the inspector methods are registered
, active
, scheduled
, etc. will return a dictionary with the results classified by workers selected by calling celery.current_app.control.inspect()
(if none of the workers are passed as arguments, all employees are implicitly selected).
source share