Skip to content

Commit

Permalink
Remove Redis 4.2 warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgxworld committed Jul 14, 2020
1 parent cea53b8 commit e0505ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mini_profiler/storage/redis_store.rb
Expand Up @@ -33,7 +33,7 @@ def load(id)

def set_unviewed(user, id)
key = user_key(user)
if redis.exists(prefixed_id(id))
if redis.call([:exists, prefixed_id(id)]) == 1
expire_at = Process.clock_gettime(Process::CLOCK_MONOTONIC).to_i + redis.ttl(prefixed_id(id))
redis.zadd(key, expire_at, id)
end
Expand All @@ -44,7 +44,7 @@ def set_all_unviewed(user, ids)
key = user_key(user)
redis.del(key)
ids.each do |id|
if redis.exists(prefixed_id(id))
if redis.call([:exists, prefixed_id(id)]) == 1
expire_at = Process.clock_gettime(Process::CLOCK_MONOTONIC).to_i + redis.ttl(prefixed_id(id))
redis.zadd(key, expire_at, id)
end
Expand Down

0 comments on commit e0505ea

Please sign in to comment.