lantins/resque-retry — pull request #32 by davebenvenuti (2011-11-29 19:59:29+00:00)
Title: Per exception retry parameters

Let's try this again!

This is an oldie I've had sitting around for a while. The idea is that it allows you to set different retry delays for different classes of exceptions. so, for example, the following is possible:

class MyJob
extend Resque::Plugins::Retry

@retry_limit = 1
@retry_exceptions = [Timeout::Error, Net::IMAP::NoResponseError]
@retry_delay = { Timeout::Error => 60, Net::IMAP::NoResponseError => 30}

...
end

This would give timeout errors a retry delay of 60 seconds, while imap no response errors would have a delay of 30