resque/resque — pull request #1144 by dwilkie (2013-10-29 10:19:48+00:00)
Title: Prevent a Resque::Failure from being created when requeing jobs 1.x-stable

I'm currently using the `on_failure_retry` hook to re-enqueue jobs like this:

```ruby
def on_failure_retry(exception, *args)
if exception.is_a?(Resque::TermException)
Resque.enqueue(self, *args)
end
end
```
In these cases I don't want a new Resque::Failure to be created and shown in ResqueWeb

Borrowing from the idea for the before_hooks where you can raise a `Resque::DontPerform` exception to prevent a job from being run, it would would be nice if we could do something like this:

```ruby
def on_failure_retry(exception, *args)
if exception.is_a?(Resque::TermException)
Resque.enqueue(self, *args)
raise Resque::DontFail
end
end
```
This would prevent the code `Resque::Failure.create` from being called.

I think this approach is more flexible than automatically trying to rescue from `Resque::TermException` because the approach can be used for any job that has been requeued.

If people are happy with this solution I'll go ahead and attache a pull-request.