python - 在 Celery 中检索队列中的任务列表

如何检索队列中尚未处理的任务列表?

最佳答案

编辑:查看其他答案以获取队列中的任务列表。

你应该看这里: Celery Guide - Inspecting Workers

基本上是这样的:

my_app = Celery(...)

# Inspect all nodes.
i = my_app.control.inspect()

# Show the items that have an ETA or are scheduled for later processing
i.scheduled()

# Show tasks that are currently active.
i.active()

# Show tasks that have been claimed by workers
i.reserved()

取决于你想要什么

https://stackoverflow.com/questions/5544629/

相关文章:

python - 如何使用 strftime 计算期间 (AM/PM)?

python - 如何获取python列表的第n个元素或默认值(如果不可用)

python - 如何将一列中的文本拆分为多行

python - 我可以使用 `pip` 而不是 `easy_install` 进行 `python

linux - 如何在 Ubuntu 中添加用户?

linux - 计算shell中文件的大小

linux - 解释段错误消息

python - 如何在 Linux 上使用 Python 导出

linux - 在 Linux 中编译/运行汇编程序?

python - Matplotlib 中的 bin 大小(直方图)