lantins/resque-retry — pull request #34 by davebenvenuti (2011-12-04 19:47:42+00:00)
Title: Per exception retry parameters

Third attempt. Allows the user to define retry delays for specific exception types when using the @retry_exceptions parameter. Rather than defining @retry_exceptions as an array, the user can define it as a hash where the keys are exception classes, and the values are retry delays in seconds.

class MyJob
extend Resque::Plugins::Retry

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

...
end

reference:

https://gist.github.com/1411546
https://github.com/lantins/resque-retry/pull/32