Skip to content

Instantly share code, notes, and snippets.

@mergulhao
Created July 27, 2012 19:33
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 mergulhao/3190051 to your computer and use it in GitHub Desktop.
Save mergulhao/3190051 to your computer and use it in GitHub Desktop.
DelayJob with Airbrake exception catch
class BaseJob < Struct.new(:params)
def perform
send(params[:action])
rescue Exception => exception
Airbrake.notify(exception, {
api_key: ENV['AIRBRAKE_API_KEY']
})
raise exception
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment