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:
parent
58dffd00c9
commit
d4f4627dab
1 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue