Skip to content

Commit

Permalink
DEV: Use safe_each_connection patch when preloading Rails.
Browse files Browse the repository at this point in the history
This is to ensure we still boot even if there is a problem with any of
the databases.
  • Loading branch information
tgxworld committed Jun 3, 2020
1 parent a4a33fc commit 76ce814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/discourse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ def self.preload_rails!

# load up schema cache for all multisite assuming all dbs have
# an identical schema
RailsMultisite::ConnectionManagement.each_connection do
RailsMultisite::ConnectionManagement.safe_each_connection do
dup_cache = schema_cache.dup
# this line is not really needed, but just in case the
# underlying implementation changes lets give it a shot
Expand Down

0 comments on commit 76ce814

Please sign in to comment.