Skip to content

Instantly share code, notes, and snippets.

@chrishomer
Created August 2, 2011 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrishomer/1121143 to your computer and use it in GitHub Desktop.
Save chrishomer/1121143 to your computer and use it in GitHub Desktop.
class Delayed::Worker
alias_method :original_handle_failed_job, :handle_failed_job
def handle_failed_job(job, error)
HoptoadNotifier.notify(error,{:parameters => {:job => job.attributes}})
if Rails.env.test?
ap "FAILED DELAYED JOB"
ap job
ap error
ap error.backtrace
end
original_handle_failed_job(job, error)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment