4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/raven/integrations/rails/active_job.rb', line 4
def self.included(base)
base.class_eval do
rescue_from(Exception) do |exception|
unless self.class.queue_adapter.to_s == 'ActiveJob::QueueAdapters::SidekiqAdapter'
active_job_details = {
:active_job => self.class.name,
:arguments => arguments,
:scheduled_at => scheduled_at,
:job_id => job_id,
:locale => locale,
}
if defined?(provider_job_id)
active_job_details.merge!(:provider_job_id => provider_job_id)
end
Raven.capture_exception(exception, :extra => active_job_details)
raise exception
end
end
end
end
|