DEV: Replace Time.new with Time.now (#9142)

(or `Time.zone.now`)
This commit is contained in:
Jarek Radosz
2020-03-09 17:37:49 +01:00
committed by GitHub
parent fff0e0980d
commit 85e03a7f68
5 changed files with 9 additions and 9 deletions

View File

@ -15,11 +15,11 @@ class DistributedMemoizer
unless result = redis.get(redis_key)
redis_lock_key = self.redis_lock_key(key)
start = Time.new
start = Time.now
got_lock = false
begin
while Time.new < start + MAX_WAIT && !got_lock
while Time.now < start + MAX_WAIT && !got_lock
LOCK.synchronize do
got_lock = get_lock(redis, redis_lock_key)
end