Quick and dirty resque retry all failed tasks

If you have a lot of failed tasks staked in resque, you can retry them all in one shot, but it’s the dirty way.

[cc lang=”ruby”]
>> (Resque::Failure.count-1).downto(0).each { |i| Resque::Failure.requeue(i) }
[/cc]

Dirty because it does not dequeue task when there done.
You should then remove the after having checked they really succeed.

Now you can find resque contrib for this kind of issues (retry count and so on…).

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *