mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
DEV: Upgrade Redis to 4.2.1.
This commit is contained in:
parent
1303e89a72
commit
0ff86b00cb
7 changed files with 12 additions and 40 deletions
|
@ -207,17 +207,14 @@ class DiscourseRedis
|
|||
end
|
||||
end
|
||||
|
||||
# Implement our own because https://github.com/redis/redis-rb/issues/698 has stalled
|
||||
def exists(*keys)
|
||||
keys.map! { |a| "#{namespace}:#{a}" } if @namespace
|
||||
def exists(*args)
|
||||
args.map! { |a| "#{namespace}:#{a}" } if @namespace
|
||||
DiscourseRedis.ignore_readonly { @redis.exists(*args) }
|
||||
end
|
||||
|
||||
DiscourseRedis.ignore_readonly do
|
||||
@redis.synchronize do |client|
|
||||
client.call([:exists, *keys]) do |value|
|
||||
value > 0
|
||||
end
|
||||
end
|
||||
end
|
||||
def exists?(*args)
|
||||
args.map! { |a| "#{namespace}:#{a}" } if @namespace
|
||||
DiscourseRedis.ignore_readonly { @redis.exists?(*args) }
|
||||
end
|
||||
|
||||
def mget(*args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue