I’m using RQ , and I have a failed queue with thousands of items, and another test queue I created a while back for testing which is now empty and unused. I’m wondering how to remove all jobs from the failed queue , and delete the test queue altogether?. Apologies for the basic question, but I can’t find info on this in the RQ docs, and I’m completely new to both Redis and RQ …
Default: the failed queue¶ The default safety net for RQ is the failed queue. Every job that fails execution is stored in here, along with its exception information (type, value, traceback). While this makes sure no failing jobs get lost, this is of no use to get notified pro-actively about job failure.
You can also ask RQ to retry failed jobs: from rq import Retry # Retry up to 3 times, failed job will be requeued immediately queue. enqueue (say_hello, retry = Retry (max = 3)) # Retry up to 3 times, with configurable intervals between retries queue. enqueue (say_hello, retry = Retry (max = 3, interval = [10, 30, 60])) The worker, 3/7/2013 · I didn’t look into this too much, but it seems like Queue .enqueue doesn’t work reliably on instance methods. from rq . queue import Queue from rq .registry import Registry from redis import Redis r = Redis() q = Queue (connection=r) registry…
RQ also provides a CLI tool that makes requeueing failed jobs easy. # This will requeue foo_job_id and bar_job_id from myqueue ‘s failed job registry rq requeue –queue myqueue -u redis://localhost:6379 foo_job_id bar_job_id # This command will requeue all jobs in myqueue ‘s failed job registry rq requeue –queue myqueue -u redis://localhost:6379 –all, As per usual, comments are welcome 🙂 Fixes #380, nvie merged 59 commits into rq : master from selwin: working- queue Sep 8, 2014 +391 ?269 Conversation 27 Commits 59 Checks 0 Files changed 21, Taking Down Workers . If, at any time, the worker receives SIGINT (via Ctrl+C) or SIGTERM (via kill), the worker wait until the currently running task is finished, stop the work loop and gracefully register its own death.. If, during this takedown phase, SIGINT or SIGTERM is received again, the worker will forcefully terminate the child process (sending it SIGKILL), but will still try to …
With RQ , you dont have to set up any queues upfront, and you dont have to specify any channels, exchanges, routing rules, or whatnot. You can just put jobs onto any queue you want. As soon as you enqueue a job to a queue that does not exist yet, it is created on the fly. RQ does not use an advanced broker to do the message routing for you …