mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
FIX: PostgreSQL fallback thread doesn't run server starts in readonly.
This commit is contained in:
@ -57,7 +57,10 @@ class PostgreSQLFallbackHandler
|
|||||||
end
|
end
|
||||||
|
|
||||||
def initiate_fallback_to_master
|
def initiate_fallback_to_master
|
||||||
return unless @initialized
|
unless @initialized
|
||||||
|
@initialized = true
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
@masters_down.hash.keys.each do |key|
|
@masters_down.hash.keys.each do |key|
|
||||||
RailsMultisite::ConnectionManagement.with_connection(key) do
|
RailsMultisite::ConnectionManagement.with_connection(key) do
|
||||||
|
Reference in New Issue
Block a user