mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
No need to expire readonly mode key immediately.
This commit is contained in:
parent
68388dfd25
commit
97d8cd820e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user