mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-24 16:16:21 +00:00
83ebdea24b
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
closes #13603
22 lines
588 B
Ruby
22 lines
588 B
Ruby
# frozen_string_literal: true
|
|
|
|
module ExceptionNotifier
|
|
# Notifica las excepciones como incidencias en Gitlab
|
|
class GitlabNotifier
|
|
def initialize(_); end
|
|
|
|
# Recibe la excepción y empieza la tarea de notificación en segundo
|
|
# plano.
|
|
#
|
|
# @param :exception [Exception]
|
|
# @param :options [Hash]
|
|
def call(exception, options, &block)
|
|
case exception
|
|
when BacktraceJob::BacktraceException
|
|
GitlabNotifierJob.perform_later(exception, **options)
|
|
else
|
|
GitlabNotifierJob.perform_now(exception, **options)
|
|
end
|
|
end
|
|
end
|
|
end
|