BigW Consortium Gitlab

Commit 94b2df02 by Kim "BKC" Carlbäcker

Make ensure_runner_queue_value atomic

parent 811addf2
......@@ -132,12 +132,14 @@ module Ci
def ensure_runner_queue_value
Gitlab::Redis.with do |redis|
value = redis.get(runner_queue_key)
if value == ""
value = Time.new.inspect
redis.set(runner_queue_key, value, ex: 60.minutes)
redis.multi do
value = redis.get(runner_queue_key)
if value == ""
value = Time.new.inspect
redis.set(runner_queue_key, value, ex: 60.minutes)
end
value
end
value
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment