This commit is contained in:
Guo Xiang Tan 2018-12-17 16:39:46 +08:00
parent e75ad37aaf
commit 9e795b9d90
1 changed files with 2 additions and 5 deletions

View File

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