No need to expire readonly mode key immediately.

This commit is contained in:
Guo Xiang Tan 2018-06-21 17:52:42 +08:00
parent 68388dfd25
commit 97d8cd820e
1 changed files with 2 additions and 2 deletions

View File

@ -301,6 +301,8 @@ module Discourse
unless @threads[key]&.alive?
@threads[key] = Thread.new do
while @dbs.size > 0
sleep 30
@dbs.each do |db|
RailsMultisite::ConnectionManagement.with_connection(db) do
if readonly_mode?(key)
@ -310,8 +312,6 @@ module Discourse
end
end
end
sleep 30
end
end
end