summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-08-22 13:08:46 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2019-08-22 13:51:53 +0200
commita5f6182753502a5e74b06836c9bb70d287bf6fe6 (patch)
treec3e87a2fa75eae8c87e81f1358df600b84ceca9c /app/services
parent9174d60ba1ce3e183396f360c6e41ed23540b6d0 (diff)
downloadgitlab-ce-a5f6182753502a5e74b06836c9bb70d287bf6fe6.tar.gz
Optimise build queue serviceoptimise-build-queue-service
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.
Diffstat (limited to 'app/services')
-rw-r--r--app/services/ci/update_build_queue_service.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/services/ci/update_build_queue_service.rb b/app/services/ci/update_build_queue_service.rb
index 9c589d910eb..31c7178c9e7 100644
--- a/app/services/ci/update_build_queue_service.rb
+++ b/app/services/ci/update_build_queue_service.rb
@@ -9,6 +9,10 @@ module Ci
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