Sha256: 3d0c50c8756a4f2fd1cc1bd7b2195445f756f27473eeb7700079bf351c5e2058

Contents?: true

Size: 737 Bytes

Versions: 14

Compression:

Stored size: 737 Bytes

Contents

module Rollbar
  # Report any uncaught errors in a job to Rollbar and reraise
  module ActiveJob
    def self.included(base)
      base.send :rescue_from, Exception do |exception|
        Rollbar.error(exception,
                      :job => self.class.name,
                      :job_id => job_id,
                      :use_exception_level_filters => true,
                      :arguments => arguments)
        raise exception
      end
    end
  end
end

if defined?(ActiveSupport) && ActiveSupport.respond_to?(:on_load)
  ActiveSupport.on_load(:action_mailer) do
    # Automatically add to ActionMailer::DeliveryJob
    ActionMailer::DeliveryJob.send(:include, Rollbar::ActiveJob) if defined?(ActionMailer::DeliveryJob)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rollbar-3.2.0 lib/rollbar/plugins/active_job.rb
rollbar-3.1.2 lib/rollbar/plugins/active_job.rb
rollbar-3.1.1 lib/rollbar/plugins/active_job.rb
rollbar-3.1.0 lib/rollbar/plugins/active_job.rb
rollbar-3.0.1 lib/rollbar/plugins/active_job.rb
rollbar-3.0.0 lib/rollbar/plugins/active_job.rb
rollbar-2.27.1 lib/rollbar/plugins/active_job.rb
rollbar-2.27.0 lib/rollbar/plugins/active_job.rb
rollbar-2.26.1 lib/rollbar/plugins/active_job.rb
rollbar-2.26.0 lib/rollbar/plugins/active_job.rb
rollbar-2.25.1 lib/rollbar/plugins/active_job.rb
rollbar-2.25.0 lib/rollbar/plugins/active_job.rb
rollbar-2.24.0 lib/rollbar/plugins/active_job.rb
rollbar-2.23.2 lib/rollbar/plugins/active_job.rb