mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:21:41 +00:00
deploys sin notificar
This commit is contained in:
parent
6e9b333cd5
commit
6712393393
1 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@ class DeployJob < ApplicationJob
|
||||||
class DeployException < StandardError; end
|
class DeployException < StandardError; end
|
||||||
|
|
||||||
# rubocop:disable Metrics/MethodLength
|
# rubocop:disable Metrics/MethodLength
|
||||||
def perform(site)
|
def perform(site, notify = true)
|
||||||
ActiveRecord::Base.connection_pool.with_connection do
|
ActiveRecord::Base.connection_pool.with_connection do
|
||||||
@site = Site.find(site)
|
@site = Site.find(site)
|
||||||
@site.update_attribute :status, 'building'
|
@site.update_attribute :status, 'building'
|
||||||
|
@ -15,14 +15,14 @@ class DeployJob < ApplicationJob
|
||||||
# No es opcional
|
# No es opcional
|
||||||
unless @deployed[:deploy_local]
|
unless @deployed[:deploy_local]
|
||||||
@site.update_attribute :status, 'waiting'
|
@site.update_attribute :status, 'waiting'
|
||||||
notify_usuaries
|
notify_usuaries if notify
|
||||||
|
|
||||||
# Hacer fallar la tarea
|
# Hacer fallar la tarea
|
||||||
raise DeployException, deploy_local.build_stats.last.log
|
raise DeployException, deploy_local.build_stats.last.log
|
||||||
end
|
end
|
||||||
|
|
||||||
deploy_others
|
deploy_others
|
||||||
notify_usuaries
|
notify_usuaries if notify
|
||||||
@site.update_attribute :status, 'waiting'
|
@site.update_attribute :status, 'waiting'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue