PERF: Reduce hit to Redis server when keeping a site in reaonly mode.
This commit is contained in:
parent
86a2172bda
commit
c29076152d
|
@ -333,9 +333,7 @@ module Discourse
|
|||
|
||||
@dbs.each do |db|
|
||||
RailsMultisite::ConnectionManagement.with_connection(db) do
|
||||
if readonly_mode?(key)
|
||||
$redis.expire(key, READONLY_MODE_KEY_TTL)
|
||||
else
|
||||
if !$redis.expire(key, READONLY_MODE_KEY_TTL)
|
||||
@dbs.delete(db)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue