3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/bugwatch/active_job_handler.rb', line 3
def call(job, exception)
return if Bugwatch.configuration.ignore?(exception)
return unless Bugwatch.configuration.notify_for_release_stage?
return if ReportedExceptions.reported?(exception)
payload = ErrorBuilder.new(exception).build
payload[:context] = {
job_class: job.class.name,
job_id: job.job_id,
queue_name: job.queue_name,
arguments: safe_arguments(job.arguments)
}
Notification.new(payload).deliver
ReportedExceptions.mark(exception)
end
|