mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-21 17:06:23 +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
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Reference in a new issue