5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 15:56:21 +00:00

fixup! feat: generar el sitio en orden #10464

This commit is contained in:
f 2023-03-18 14:21:11 -03:00
parent 51e11d38e4
commit 56b2556447

View file

@ -67,7 +67,7 @@ class DeployJob < ApplicationJob
# @param :deploy [Deploy]
# @return [Boolean]
def failed_dependencies?(deploy)
!(deploy.class::DEPENDENCIES - failed_dependencies(deploy)).empty?
failed_dependencies(deploy).present?
end
# Obtiene las dependencias fallidas de un deploy
@ -75,9 +75,9 @@ class DeployJob < ApplicationJob
# @param :deploy [Deploy]
# @return [Array]
def failed_dependencies(deploy)
@deployed.select do |_, v|
!v[:status]
end.keys
deploy.class::DEPENDENCIES & (@deployed.reject do |_, v|
v[:status]
end.keys)
end
# @param :exception [StandardError]
@ -86,7 +86,8 @@ class DeployJob < ApplicationJob
data = {
site: @site.id,
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)