5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 15:51:41 +00:00

fix: capturar todas las posibles excepciones

This commit is contained in:
f 2023-03-18 15:22:10 -03:00
parent 58dffd00c9
commit d4f4627dab

View file

@ -39,19 +39,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