5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-19 22:36:21 +00:00

fix: capturar todas las posibles excepciones

This commit is contained in:
f 2023-03-18 15:22:10 -03:00
parent 39a615c00c
commit 816773282b

View file

@ -37,19 +37,21 @@ class DeployJob < ApplicationJob
status = d.deploy
seconds = d.build_stats.last.try(:seconds)
size = d.size
urls = d.respond_to?(:urls) ? d.urls : [d.url].compact
rescue StandardError => e
status = false
seconds = 0
size = 0
seconds ||= 0
size ||= 0
urls ||= []
notify_exception e, d
end
@deployed[d.type.underscore.to_sym] = {
status: status,
seconds: seconds || 0,
seconds: seconds,
size: size,
urls: d.respond_to?(:urls) ? d.urls : [d.url].compact
urls: urls
}
end