disque
disque copied to clipboard
Provide a way to flush a queue?
May you provide more details? Examples:
- Single node or cluster wide?
- Just the queue or also all the jobs inside the queue? And in this case again, should the jobs be evicted cluster-wide?
I can see how sometimes you may want to start from scratch btw, so likely this is going to be needed in one form or the other. A typical example would be an error in the producer that creates a number of useless jobs that can't be processed at all. Another one is development setups.
Testing. During setup you want to wipe up all the queues, otherwise you end of processing jobs from the previous test case/run.
Discussed this with @antirez yesterday. @assaf: for testing, you can run DEBUG FLUSHALL
.
@antirez @djanowski sorry I haven't had time to clarify my proposal. I'll provide further info later.
@djanowski did you come to a conclusion with antirez?
I'll re-evaluate this in the next days before 1.0-RC1.
I'm interested in this also. This would be pretty useful for a huge number of reasons e.g. clearing a queue that a client has flooded with bogus messages.
This is what I propose the command would look like:
QFLUSH <queue> [TTL] [timestamp]
- TTL sec flush jobs with a TTL less than this value
- timestamp flush jobs created after this timestamp
Any plans for this?
I'd like to see this as well. I've found that it's possible to get into a deadlocked situation where no new messages can be added due to an out of memory condition. Having an easy way to flush a queue from the cluster would be useful when situations like this occur.