mperham/sidekiq — pull request #780 by jkassemi (2013-03-18 21:25:55+00:00)
Title: Hook to process events after a job fails all retries

When the maximum number of retries is hit and the message is about
to be thrown away, give the option of allowing the worker to say
goodbye by defining an 'exhausted' method on the worker.

We have a job that calls a third party service that's not consistently available. The retry
middleware handles 99% of cases appropriately, but in the event we're not able to reach
the service for all retry attempts, we need an error notification.