Class: Bugwatch::ActiveJobHandler
- Inherits:
-
Object
- Object
- Bugwatch::ActiveJobHandler
- Defined in:
- lib/bugwatch/active_job_handler.rb
Instance Method Summary collapse
Instance Method Details
#call(job, exception) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# 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? 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 end |