Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emptying failed queue #334

Merged
merged 2 commits into from
Apr 14, 2014
Merged

Emptying failed queue #334

merged 2 commits into from
Apr 14, 2014

Conversation

nvie
Copy link
Collaborator

@nvie nvie commented Apr 14, 2014

This reimplements the Queue.empty() method to be faster and atomic, using a Lua script. Also, make this function really easily available from the command line. It was embarrassing how long RQ has done without an easy way of clearing the failed queue. From now on, it's as easy as running:

$ rqinfo -X
4218 jobs removed from failed queue

This makes the .empty() function perform all the computing in Redis
itself, rather than in Python.  This is both atomic, and faster.
This can be used to empty the failed queue right from the command line.
nvie added a commit that referenced this pull request Apr 14, 2014
@nvie nvie merged commit aef7af9 into master Apr 14, 2014
@nvie nvie deleted the emptying-failed-queue branch May 21, 2014 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant