From 655edf59e1bd3ee8a739e07b4b9e31df16a28eec Mon Sep 17 00:00:00 2001 From: f Date: Thu, 23 Mar 2023 18:02:43 -0300 Subject: [PATCH 1/2] fix: no intentar notificar si no hay sitio closes #12753 --- app/jobs/deploy_job.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/jobs/deploy_job.rb b/app/jobs/deploy_job.rb index f0dc23f3..8b1e1df0 100644 --- a/app/jobs/deploy_job.rb +++ b/app/jobs/deploy_job.rb @@ -67,11 +67,13 @@ class DeployJob < ApplicationJob rescue DeployTimedOutException => e notify_exception e ensure - @site&.update status: 'waiting' + if @site.present? + @site.update status: 'waiting' - notify_usuaries if notify + notify_usuaries if notify - puts "\a" if @output + puts "\a" if @output + end end end # rubocop:enable Metrics/MethodLength From e92d5947b437cf6f30f070f3c04969732ac8578d Mon Sep 17 00:00:00 2001 From: f Date: Thu, 23 Mar 2023 18:25:55 -0300 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20no=20fallar=20njalla=20si=20fall?= =?UTF-8?q?=C3=B3=20dp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #12410 --- app/models/deploy_distributed_press.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/deploy_distributed_press.rb b/app/models/deploy_distributed_press.rb index 6a6b1d64..679da09d 100644 --- a/app/models/deploy_distributed_press.rb +++ b/app/models/deploy_distributed_press.rb @@ -133,6 +133,7 @@ class DeployDistributedPress < Deploy # XXX: Esto depende de nuestro DNS actual, cuando lo migremos hay # que eliminarlo. unless site.name.end_with? '.' + self.remote_info ||= {} self.remote_info['njalla'] = {} self.remote_info['njalla']['a'] = njalla.add_record(name: site.name, type: 'CNAME', content: "#{Site.domain}.").to_h self.remote_info['njalla']['ns'] = njalla.add_record(name: "_dnslink.#{site.name}", type: 'NS', content: "#{publisher.hostname}.").to_h