Sha256: 4c5c052db674e445e4bd106e858875766553d60d4e0e489401938c8fa4c23b87
Contents?: true
Size: 1010 Bytes
Versions: 20
Compression:
Stored size: 1010 Bytes
Contents
module Airbrake module Rails ## # Enables support for exceptions occurring in ActiveJob jobs. module ActiveJob extend ActiveSupport::Concern included do if ::Rails.application.config.respond_to?(:active_job) active_job_cfg = ::Rails.application.config.active_job is_resque_adapter = (active_job_cfg.queue_adapter == :resque) end rescue_from(Exception) do |exception| if (notice = Airbrake.build_notice(exception)) notice[:context][:component] = 'active_job' notice[:context][:action] = self.class.name notice[:params] = serialize # We special case Resque because it kills our workers by forking, so # we use synchronous delivery instead. if is_resque_adapter Airbrake.notify_sync(notice) else Airbrake.notify(notice) end end raise exception end end end end end
Version data entries
20 entries across 20 versions & 2 rubygems