summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2016-12-15 22:37:52 +0100
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2016-12-15 22:37:52 +0100
commita20681c093d5444d24c54f41fd49a98ef919cd42 (patch)
tree3714a3800aa9378698f08e8f801945d5185fa657 /app/workers
parente179544342247c9a227c1ef3c3e709a0449158e3 (diff)
downloadgitlab-ce-a20681c093d5444d24c54f41fd49a98ef919cd42.tar.gz
Update Runners in a Service
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/build_queue_worker.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/app/workers/build_queue_worker.rb b/app/workers/build_queue_worker.rb
index 141c1543aeb..8cc99eabdfe 100644
--- a/app/workers/build_queue_worker.rb
+++ b/app/workers/build_queue_worker.rb
@@ -4,22 +4,8 @@ class BuildQueueWorker
def perform(build_id)
Ci::Build.find_by(id: build_id).try do |build|
- build.project.runners.select do |runner|
- if runner.can_pick?(build)
- # Inject last_update into Redis
- Gitlab::Redis.with do |redis|
- new_update = Time.new.inspect
- redis.set(runner_redis_key(runner), new_update, ex: 60.minutes)
- end
- end
- end
+ UpdateBuildQueueService.new(build)
end
end
- private
-
- def runner_redis_key(runner)
- "#{runner.token}_#{runner.tag_list}"
- end
-
end