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

标签 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()

取决于你想要什么

关于python - 在 Celery 中检索队列中的任务列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5544629/

相关文章:

python - 微服务和多个数据库

python - 结果后端的 Celery celery_taskmeta 表在任务完成之前不保存

相当于 GNU 'cat' 的 python 显示唯一行

python - 与 mod_wsgi 相比, mod_python "work"怎么样?

python-3.x - 得到 celery.exceptions.NotRegistered 但 celery -A 应用程序检查已注册 显示我的任务已注册

python - 无法在docker容器中启动rabbitmq-server,这个Dockerfile怎么写?

python - 有没有办法优化矩阵与一组样本的比较?

python - 查找 DataFrame 中相邻元素(行和列)的平均值

python - undefined symbol : _ZdlPvm

django - 使用 Django 重定向和传递 Celery 任务数据