mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: in readonly mode don't double count pages
This commit is contained in:
@ -159,6 +159,7 @@ class DiscourseRedis
|
||||
|
||||
fallback_handler.verify_master if !fallback_handler.master
|
||||
Discourse.received_readonly!
|
||||
nil
|
||||
else
|
||||
raise ex
|
||||
end
|
||||
@ -231,6 +232,14 @@ class DiscourseRedis
|
||||
@redis.client.reconnect
|
||||
end
|
||||
|
||||
def namespace_key(key)
|
||||
if @namespace
|
||||
"#{namespace}:#{key}"
|
||||
else
|
||||
key
|
||||
end
|
||||
end
|
||||
|
||||
def namespace
|
||||
RailsMultisite::ConnectionManagement.current_db
|
||||
end
|
||||
|
Reference in New Issue
Block a user