2018-07-16 12:31:01 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-12-15 16:37:52 -05:00
|
|
|
module Ci
|
2016-12-20 22:27:03 -05:00
|
|
|
class UpdateBuildQueueService
|
2016-12-15 16:37:52 -05:00
|
|
|
def execute(build)
|
2018-04-30 09:25:49 -04:00
|
|
|
tick_for(build, build.project.all_runners)
|
2017-10-30 11:17:17 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def tick_for(build, runners)
|
|
|
|
runners.each do |runner|
|
2018-05-02 10:42:12 -04:00
|
|
|
runner.pick_build!(build)
|
2017-01-20 08:32:32 -05:00
|
|
|
end
|
2016-12-15 16:37:52 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|