From 9024a13490288013f852a57e2a546161d9e47420 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 6 Apr 2022 20:48:14 -0300 Subject: [PATCH] algunos deploys no generan build_stats --- app/jobs/deploy_job.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/jobs/deploy_job.rb b/app/jobs/deploy_job.rb index 38bb0429..97438650 100644 --- a/app/jobs/deploy_job.rb +++ b/app/jobs/deploy_job.rb @@ -67,10 +67,13 @@ class DeployJob < ApplicationJob def deploy_others @site.deploys.where.not(type: 'DeployLocal').find_each do |d| + status = d.deploy + build_stat = d.build_stats.last + @deployed[d.type.underscore.to_sym] = { - status: d.deploy, - 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