This commit is contained in:
Vokhmin Alexey V 2014-07-10 00:31:32 +04:00
parent c263df2fec
commit 4f4e6eb788
1 changed files with 2 additions and 2 deletions

View File

@ -6,10 +6,10 @@ class RunExtraMassBuildsJob
end
def perform
MassBuild.where(status: BUILD_PENDING).find_each do |mb|
MassBuild.where(status: MassBuild::BUILD_PENDING).find_each do |mb|
next if mb.extra_mass_builds.blank?
next if mb.extra_mass_builds.exclude?(mass_build_id)
emb = MassBuild.where(status: SUCCESS, id: mb.extra_mass_builds).to_a
emb = MassBuild.where(status: MassBuild::SUCCESS, id: mb.extra_mass_builds).to_a
next if emb.size != mb.extra_mass_builds.size
next if emb.find{ |mb| not_ready?(mb) }