zapnap/resque_mailer — pull request #56 by maletor (2013-04-30 16:27:23+00:00)
Title: Add action and args as arguments for the lambda

Necessary in case resque_mailer receives a SIGTERM, in which case we need to rescue it and enqueue it for delivery (or send it immediately).

This will allow the following, while remaining backwards compatible.

``` ruby
Resque::Mailer.error_handler = lambda { |mailer, message, exception, action, args|
Resque.enqueue(mailer, action, *args) if exception.is_a?(Resque::TermException)
}
```