mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-28 07:26:22 +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
|