2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-08 12:06:51 +08:00

DEV: Implement multiple keys support for DiscourseRedis#exists.

This commit is contained in:
Guo Xiang Tan 2020-06-01 11:20:20 +08:00
parent 3894555b2e
commit df62407f35
No known key found for this signature in database
GPG key ID: FBD110179AAC1F20
3 changed files with 39 additions and 2 deletions

View file

@ -489,7 +489,7 @@ module Discourse
end
def self.readonly_mode?(keys = READONLY_KEYS)
recently_readonly? || Discourse.redis.mget(*keys).compact.present?
recently_readonly? || Discourse.redis.exists(*keys)
end
def self.pg_readonly_mode?