Skip to content Skip to sidebar Skip to footer

How Do I Get The Number Of Jobs In A Rq Queue?

I've using rq and RedisToGo. How do I get the number of jobs in the queue? I can't find it in the documentation? (In Python) When I try: print 'Before: ', len(q.jobs) result = q.en

Solution 1:

For RQ, you should be able to just get the len of the jobs in a queue:

from rq import Queue

queue = Queue()
len(queue.jobs)

Post a Comment for "How Do I Get The Number Of Jobs In A Rq Queue?"