mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 20:16:22 +00:00
Merge branch 'issue-10031' into panel.sutty.nl
This commit is contained in:
commit
2b24b49c8e
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
# Realiza el deploy de un sitio
|
# Realiza el deploy de un sitio
|
||||||
class DeployJob < ApplicationJob
|
class DeployJob < ApplicationJob
|
||||||
class DeployException < StandardError; end
|
class DeployException < StandardError; end
|
||||||
|
class DeployTimedOutException < DeployException; end
|
||||||
|
|
||||||
# rubocop:disable Metrics/MethodLength
|
# rubocop:disable Metrics/MethodLength
|
||||||
def perform(site, notify: true, time: Time.now, output: false)
|
def perform(site, notify: true, time: Time.now, output: false)
|
||||||
|
@ -19,7 +20,7 @@ class DeployJob < ApplicationJob
|
||||||
if @site.building?
|
if @site.building?
|
||||||
if 10.minutes.ago >= time
|
if 10.minutes.ago >= time
|
||||||
@site.update status: 'waiting'
|
@site.update status: 'waiting'
|
||||||
raise DeployException,
|
raise DeployTimedOutException,
|
||||||
"#{@site.name} la tarea estuvo más de 10 minutos esperando, volviendo al estado original"
|
"#{@site.name} la tarea estuvo más de 10 minutos esperando, volviendo al estado original"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue