2017-10-16 18:15:47 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-10-16 18:04:44 -07:00
|
|
|
module ExceptionNotifierInDelayedJob
|
|
|
|
def handle_failed_job(job, error)
|
2017-10-16 18:15:47 -07:00
|
|
|
super
|
2017-10-16 18:04:44 -07:00
|
|
|
ExceptionNotfier.notify_exception(error)
|
|
|
|
end
|
|
|
|
end
|
2017-09-13 10:11:04 -04:00
|
|
|
|
2017-10-16 18:04:44 -07:00
|
|
|
Delayed::Worker.class_eval do
|
|
|
|
prepend ExceptionNotifierInDelayedJob
|
2017-09-13 10:11:04 -04:00
|
|
|
end
|