如何列出 celery中排队的物品?
我在Ubuntu EC2节点上有一个Django项目,我一直在使用它来设置异步Celery
。
我正在跟文档一起关注http://michal.karzynski.pl/blog/2014/05/18/setting-up-an-
asynchronous-task-queue-for-django-using-celery-
redis/。
我已经可以使用以下命令在命令行上执行基本任务:
(env1)ubuntu@ip-172-31-22-65:~/projects/tp$ celery --app=myproject.celery:app worker --loglevel=INFO
我刚刚意识到,队列中有一堆尚未执行的任务:
[2015-03-28 16:49:05,916: WARNING/MainProcess] Restoring 4 unacknowledged message(s).
(env1)ubuntu@ip-172-31-22-65:~/projects/tp$ celery -A tp purge
WARNING: This will remove all tasks from queue: celery.
There is no undo for this operation!
(to skip this prompt use the -f option)
Are you sure you want to delete all tasks (yes/NO)? yes
Purged 81 messages from 1 known task queue.
如何从命令行获取排队项目的列表?