a5f6182753
This makes BuildQueueService to force refresh runners that are considered to have recent queue. Such runners are the ones that connected within online interval + time to expire runner cache.
21 lines
457 B
Ruby
21 lines
457 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Ci
|
|
class UpdateBuildQueueService
|
|
def execute(build)
|
|
tick_for(build, build.project.all_runners)
|
|
end
|
|
|
|
private
|
|
|
|
def tick_for(build, runners)
|
|
if Feature.enabled?(:ci_update_queues_for_online_runners, build.project, default_enabled: true)
|
|
runners = runners.with_recent_runner_queue
|
|
end
|
|
|
|
runners.each do |runner|
|
|
runner.pick_build!(build)
|
|
end
|
|
end
|
|
end
|
|
end
|