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 diff --git a/app/models/deploy_distributed_press.rb b/app/models/deploy_distributed_press.rb index 7edfdcd1..ac26300c 100644 --- a/app/models/deploy_distributed_press.rb +++ b/app/models/deploy_distributed_press.rb @@ -135,6 +135,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