我用过rq http://python-rq.org/和 RedisToGo。如何获取队列中的作业数量?我在文档中找不到它? (Python)
当我尝试时:
print "Before: ", len(q.jobs)
result = q.enqueue(worker.A)
result = q.enqueue(worker.B)
print "After: ", len(q.jobs)
两次都只给出 0。
对于 RQ,您应该能够得到len
队列中的作业数:
from rq import Queue
queue = Queue()
len(queue)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)