gitlab-org--gitlab-foss/app/services/ci/update_build_queue_service.rb
2017-01-20 14:32:32 +01:00

19 lines
413 B
Ruby

module Ci
class UpdateBuildQueueService
def execute(build)
build.project.runners.each do |runner|
if runner.can_pick?(build)
runner.tick_runner_queue
end
end
return unless build.project.shared_runners_enabled?
Ci::Runner.shared.each do |runner|
if runner.can_pick?(build)
runner.tick_runner_queue
end
end
end
end
end