diff --git a/lib/discourse.rb b/lib/discourse.rb index 7f5b0182e0b..780321a361b 100644 --- a/lib/discourse.rb +++ b/lib/discourse.rb @@ -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