5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 06:56:22 +00:00

Merge branch 'issue-12958' into panel.sutty.nl
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2023-04-10 18:02:10 -03:00
commit 354e0a37c2
3 changed files with 7 additions and 4 deletions

View file

@ -10,8 +10,6 @@ class DeployJob < ApplicationJob
# Lanzar lo antes posible # Lanzar lo antes posible
self.priority = 10 self.priority = 10
# Intentar dentro de un minuto
self.retry_interval = 60
def handle_error(error) def handle_error(error)
case error case error

View file

@ -11,7 +11,12 @@ module ExceptionNotifier
# @param [Exception] # @param [Exception]
# @param [Hash] # @param [Hash]
def call(exception, **options) def call(exception, **options)
case exception
when BacktraceJob::BacktraceException
GitlabNotifierJob.perform_later(exception, **options) GitlabNotifierJob.perform_later(exception, **options)
else
GitlabNotifierJob.perform_now(exception, **options)
end
end end
end end
end end

View file

@ -142,7 +142,7 @@ Rails.application.configure do
} }
config.action_mailer.default_options = { from: ENV.fetch('DEFAULT_FROM', "noreply@sutty.nl") } config.action_mailer.default_options = { from: ENV.fetch('DEFAULT_FROM', "noreply@sutty.nl") }
config.middleware.use ExceptionNotification::Rack, gitlab: {} config.middleware.use ExceptionNotification::Rack, gitlab: {}, ignore_exceptions: (['DeployJob::DeployAlreadyRunningException'] + ExceptionNotifier.ignored_exceptions)
Rails.application.routes.default_url_options[:host] = "panel.#{ENV.fetch('SUTTY', 'sutty.nl')}" Rails.application.routes.default_url_options[:host] = "panel.#{ENV.fetch('SUTTY', 'sutty.nl')}"
Rails.application.routes.default_url_options[:protocol] = 'https' Rails.application.routes.default_url_options[:protocol] = 'https'