2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-04 08:47:37 +08:00

Internally AR::Base.establish_connection removes the current connection.

This commit is contained in:
Guo Xiang Tan 2016-02-04 11:06:02 +08:00
parent a08496bb1a
commit c532d7d1ae
2 changed files with 19 additions and 25 deletions

View file

@ -24,7 +24,6 @@ class PostgreSQLFallbackHandler
if connection.active?
logger.info "#{self.class}: Master server is active. Reconnecting..."
ActiveRecord::Base.remove_connection
ActiveRecord::Base.establish_connection(config)
Discourse.disable_readonly_mode
@master = true