How to list the queued items in celery?
If you want to get all scheduled tasks,
celery inspect scheduled
To find all active queues
celery inspect active_queues
For status
celery inspect stats
For all commands
celery inspect
If you want to get it explicitily.Since you are using redis
as queue.Then
redis-cli
>KEYS * #find all keys
Then find out something related to celery
>LLEN KEY # i think it gives length of list
How to get Task objects for scheduled celery tasks?
I am not sure you can actually get the actual Task instance, but you can easily create AsyncResult by simply instantiating it with the task ID you want to inspect, and you need (naturally) to pass the Celery application object to it too.
Some pseudo-code:
from celery.result import AsyncResult
from my.project.celeryapp import myapp
task_res = AsyncResult("9ed888fe-f6b6-4443-85d3-787c5c1b26b0", app=myapp)
print(task_res.state)
Related Topics
Flask to Return Image Stored in Database
How to Make File Creation an Atomic Operation
How to Put Multiple Statements in One Line
Complexity of *In* Operator in Python
Calculate Average of Every X Rows in a Table and Create New Table
Split a String with Unknown Number of Spaces as Separator in Python
"Pythonic" Method to Parse a String of Comma-Separated Integers into a List of Integers
Postponing Functions in Python
Defining a Discrete Colormap for Imshow in Matplotlib
Reading Unicode File Data with Bom Chars in Python
How to Sort a List of Tuples According to Another List
How to Escape Strings for SQLite Table/Column Names in Python
Pyinstaller and --Onefile: How to Include an Image in the Exe File
Getting a Callback When a Tkinter Listbox Selection Is Changed