Improve readability of runner tick queue method
This commit is contained in:
parent
10678525b0
commit
ecb9f978eb
1 changed files with 5 additions and 3 deletions
|
@ -126,9 +126,11 @@ module Ci
|
||||||
end
|
end
|
||||||
|
|
||||||
def tick_runner_queue
|
def tick_runner_queue
|
||||||
new_update = SecureRandom.hex
|
SecureRandom.hex.tap do |new_update|
|
||||||
Gitlab::Redis.with { |redis| redis.set(runner_queue_key, new_update, ex: RUNNER_QUEUE_EXPIRY_TIME) }
|
Gitlab::Redis.with do |redis|
|
||||||
new_update
|
redis.set(runner_queue_key, new_update, ex: RUNNER_QUEUE_EXPIRY_TIME)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def ensure_runner_queue_value
|
def ensure_runner_queue_value
|
||||||
|
|
Loading…
Reference in a new issue