Module: ResqueMods::AirbrakeNotifyJob

Defined in:
lib/resque-mods/airbrake_notify_job.rb

Instance Method Summary collapse

Instance Method Details

#around_perform_notify_airbrake(*args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/resque-mods/airbrake_notify_job.rb', line 3

def around_perform_notify_airbrake(*args)
  begin 
    yield *args 
  rescue => e
    if defined? Airbrake
      Airbrake.notify(e)
    else 
      ResqueMods.logger.error "Airbrake not present. Hit error: #{e.message}"
      raise
    end 
  end 
end