I have 1 failed job on failed queue.
$ rq info
failed |█ 1
1 queues, 1 jobs total
As answered by @Byron Ruth, I can get that number this way:
from rq import Queue
from redis import Redis
q = Queue('failed', connection=Redis())
print len (q.jobs)
On rq-dashboard, I see the traceback:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/rq/worker.py", line 588, in perform_job
rv = job.perform()
...
How can I get this traceback using Python code? If that is not possible, any programmatic solution is acceptable (e.g. via Bash).