0

I'm using Python RQ (backed by Redis) to feed tasks to a bunch of worker processes.

I accidentally sent a tuple when adding a job to a queue, so now I have queues like this:

high
medium
low
('low',)
default

I can't seem to figure out how to get rid of the ('low',) queue. The queue also seems to cause some issues due to its name (for instance, I couldn't view it or clear it in rq-dashboard as the page would refuse to load).

There is some discussion here: RQ - Empty & Delete Queues, but that only covers emptying a queue. I am able to empty the queue just fine from within Python, but I can't seem to actually delete the queue from the Redis server.

The RQ documentation doesn't seem to provide any information on getting rid of a queue you don't want.

I want to actually delete that queue (not just empty it) instead of carrying it around forever.

Community
  • 1
  • 1
o.h
  • 1,202
  • 1
  • 14
  • 24

1 Answers1

2

The RQ stores all the queues under rq:queues keys. This can be accessed by the redis-cli.

smembers rq:queues

I also stumbled upon Destroying / removing a Queue() in Redis Queue (rq) programmatically This might help!

Community
  • 1
  • 1
Spiritz
  • 83
  • 1
  • 7
  • Thanks, this seems to do it with `SREM rq:queues "rq:queue:('low',)"`, Queue was already empty--not sure what would happen if I tried to remove a queue that still had jobs in it. – o.h Nov 15 '16 at 01:04
  • You may integrate rq-dashboard, it can help you monitor your jobs and it also provides feature to delete queues or jobs. – Anand Joshi Jun 10 '20 at 00:31