ono/resque-cleaner — Issue #13: Requeue-ing failed jobs with args/cleaning failed jobs with no args
Author: ochko
Created: 2012-01-30 02:01:19+00:00
State: open

Recently our app had an whole load of failed jobs due to incorrect worker configs and we ended up about 10000 failed jobs. About 70% them is stateless scheduled jobs with no arguments we want to clear. And other jobs have arguments, so we want to retry and clear.

I did it opening rails console and running this 2 until it all gone:

```ruby
cleaner.clear {|j| j["payload"]["args"].size == 0}
```
and

```ruby
cleaner.requeue {|j| j["payload"]["args"].size > 0}
```

It would be nice if it was possible to do these on the resque-cleaner web interface like 'Clear all jobs older than 1000th'.