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