This commit is contained in:
Guo Xiang Tan 2018-12-17 16:39:46 +08:00
parent e75ad37aaf
commit 9e795b9d90

View File

@ -358,11 +358,8 @@ module Discourse
end end
def self.recently_readonly? def self.recently_readonly?
if (read_only = last_read_only[$redis.namespace]).blank? read_only = last_read_only[$redis.namespace]
return false read_only.present? && read_only > 15.seconds.ago
end
read_only > 15.seconds.ago
end end
def self.received_readonly! def self.received_readonly!