mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-19 08:13:37 +00:00
fix: capturar todas las posibles excepciones
This commit is contained in:
parent
58dffd00c9
commit
d4f4627dab
1 changed files with 6 additions and 4 deletions
|
@ -39,19 +39,21 @@ class DeployJob < ApplicationJob
|
||||||
status = d.deploy
|
status = d.deploy
|
||||||
seconds = d.build_stats.last.try(:seconds)
|
seconds = d.build_stats.last.try(:seconds)
|
||||||
size = d.size
|
size = d.size
|
||||||
|
urls = d.respond_to?(:urls) ? d.urls : [d.url].compact
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
status = false
|
status = false
|
||||||
seconds = 0
|
seconds ||= 0
|
||||||
size = 0
|
size ||= 0
|
||||||
|
urls ||= []
|
||||||
|
|
||||||
notify_exception e, d
|
notify_exception e, d
|
||||||
end
|
end
|
||||||
|
|
||||||
@deployed[d.type.underscore.to_sym] = {
|
@deployed[d.type.underscore.to_sym] = {
|
||||||
status: status,
|
status: status,
|
||||||
seconds: seconds || 0,
|
seconds: seconds,
|
||||||
size: size,
|
size: size,
|
||||||
urls: d.respond_to?(:urls) ? d.urls : [d.url].compact
|
urls: urls
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue