5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 13:56:22 +00:00
panel/app/lib/exception_notifier/gitlab_notifier.rb
f 83ebdea24b
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: soporte para ruby 3.1 #9357
closes #13603
2023-06-14 13:33:47 -03:00

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