Clear all connections once master recovers.
This commit is contained in:
parent
c06824e9c2
commit
646ed87aba
|
@ -80,6 +80,7 @@ class PostgreSQLFallbackHandler
|
|||
self.master_up(key)
|
||||
disable_readonly_mode
|
||||
Sidekiq.unpause!
|
||||
clear_connections
|
||||
end
|
||||
rescue => e
|
||||
logger.warn "#{log_prefix}: Connection to master PostgreSQL server failed with '#{e.message}'"
|
||||
|
|
|
@ -36,7 +36,6 @@ describe ActiveRecord::ConnectionHandling do
|
|||
|
||||
after do
|
||||
postgresql_fallback_handler.setup!
|
||||
postgresql_fallback_handler.clear_connections
|
||||
Discourse.disable_readonly_mode(Discourse::PG_READONLY_MODE_KEY)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue