问题描述
我使用 RabbitMQ 作为我的消息代理,我的工作人员是 Celery 任务.我正在尝试诊断一个问题,即我将任务排入 RabbitMQ 但 Celery 没有接听.
I'm using RabbitMQ as my message broker and my workers are Celery tasks. I'm trying to diagnose an issue where I'm enqueue tasks to RabbitMQ but Celery doesn't pick then up.
有什么方法可以检查 RabbitMQ 中排队的任务是什么?我想查看它们入队的日期和时间、指定的任何 ETA、参数和任务名称.
Is there a way I can check what tasks are enqueued in RabbitMQ? I'd like to see the date and time when they are enqueued, any ETA is specified, the arguments and the task name.
我无法在文档中找到这些信息——也许我忽略了它——并且希望你们中的一些人可能知道检查任务队列的简单方法.谢谢.
I haven't been able to find this information in the docs — maybe I've overlooked it — and was hoping that some of you might know an easy way to inspect the task queue. Thanks.
推荐答案
你可以使用Flower实时监控任务.
You can use Flower to monitor tasks in real time.
https://github.com/mher/flower
还检查 rabbitmqclt 命令检查 RabbitMQ 服务器状态:
Check out also rabbitmqclt command which inspects RabbitMQ server status:
http://www.rabbitmq.com/man/rabbitmqctl.1.man.html
rabbitmqctl list_queues
这篇关于如何查看 RabbitMQ 中的排队任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!