From 6712393393c3dd14b6061abcc98826ecee186640 Mon Sep 17 00:00:00 2001 From: f Date: Sun, 11 Apr 2021 16:45:26 -0300 Subject: [PATCH] deploys sin notificar --- app/jobs/deploy_job.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/jobs/deploy_job.rb b/app/jobs/deploy_job.rb index 7f42e306..98e474ac 100644 --- a/app/jobs/deploy_job.rb +++ b/app/jobs/deploy_job.rb @@ -5,7 +5,7 @@ class DeployJob < ApplicationJob class DeployException < StandardError; end # rubocop:disable Metrics/MethodLength - def perform(site) + def perform(site, notify = true) ActiveRecord::Base.connection_pool.with_connection do @site = Site.find(site) @site.update_attribute :status, 'building' @@ -15,14 +15,14 @@ class DeployJob < ApplicationJob # No es opcional unless @deployed[:deploy_local] @site.update_attribute :status, 'waiting' - notify_usuaries + notify_usuaries if notify # Hacer fallar la tarea raise DeployException, deploy_local.build_stats.last.log end deploy_others - notify_usuaries + notify_usuaries if notify @site.update_attribute :status, 'waiting' end end