diff --git a/app/jobs/deploy_job.rb b/app/jobs/deploy_job.rb index 8e4f7578..9b6e6804 100644 --- a/app/jobs/deploy_job.rb +++ b/app/jobs/deploy_job.rb @@ -69,10 +69,13 @@ class DeployJob < ApplicationJob def deploy_others @site.deploys.where.not(type: 'DeployLocal').find_each do |d| + status = d.deploy(output: @output) + build_stat = d.build_stats.last + @deployed[d.type.underscore.to_sym] = { - status: d.deploy(output: @output), - seconds: d.build_stats.last.seconds, - size: d.build_stats.last.size, + status: status, + seconds: build_stat.try(:seconds) || 0, + size: build_stat.try(:size) || 0, url: d.url } end