Created
November 12, 2018 23:23
-
-
Save carolyncole/ea7437953ca9dd3909bfbf98213abaff to your computer and use it in GitHub Desktop.
Remove all retried jobs from Failed Resque
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i = 0 | |
while i < Resque::Failure.count do | |
if Resque::Failure.all(i, 1)['retried_at'].present? | |
Resque::Failure.remove(i) | |
else | |
i += 1 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment