mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 22:36:21 +00:00
fixup! feat: generar el sitio en orden #10464
This commit is contained in:
parent
51e11d38e4
commit
56b2556447
1 changed files with 6 additions and 5 deletions
|
@ -67,7 +67,7 @@ class DeployJob < ApplicationJob
|
||||||
# @param :deploy [Deploy]
|
# @param :deploy [Deploy]
|
||||||
# @return [Boolean]
|
# @return [Boolean]
|
||||||
def failed_dependencies?(deploy)
|
def failed_dependencies?(deploy)
|
||||||
!(deploy.class::DEPENDENCIES - failed_dependencies(deploy)).empty?
|
failed_dependencies(deploy).present?
|
||||||
end
|
end
|
||||||
|
|
||||||
# Obtiene las dependencias fallidas de un deploy
|
# Obtiene las dependencias fallidas de un deploy
|
||||||
|
@ -75,9 +75,9 @@ class DeployJob < ApplicationJob
|
||||||
# @param :deploy [Deploy]
|
# @param :deploy [Deploy]
|
||||||
# @return [Array]
|
# @return [Array]
|
||||||
def failed_dependencies(deploy)
|
def failed_dependencies(deploy)
|
||||||
@deployed.select do |_, v|
|
deploy.class::DEPENDENCIES & (@deployed.reject do |_, v|
|
||||||
!v[:status]
|
v[:status]
|
||||||
end.keys
|
end.keys)
|
||||||
end
|
end
|
||||||
|
|
||||||
# @param :exception [StandardError]
|
# @param :exception [StandardError]
|
||||||
|
@ -86,7 +86,8 @@ class DeployJob < ApplicationJob
|
||||||
data = {
|
data = {
|
||||||
site: @site.id,
|
site: @site.id,
|
||||||
deploy: deploy&.type,
|
deploy: deploy&.type,
|
||||||
log: deploy&.build_stats&.last&.log
|
log: deploy&.build_stats&.last&.log,
|
||||||
|
failed_dependencies: (failed_dependencies(deploy) if deploy)
|
||||||
}
|
}
|
||||||
|
|
||||||
ExceptionNotifier.notify_exception(exception, data: data)
|
ExceptionNotifier.notify_exception(exception, data: data)
|
||||||
|
|
Loading…
Reference in a new issue