mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
@ -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
|
||||
|
Reference in New Issue
Block a user