DEV: Use safe_each_connection patch when preloading Rails.

This is to ensure we still boot even if there is a problem with any of
the databases.
This commit is contained in:
Guo Xiang Tan 2020-06-03 15:36:50 +08:00
parent a4a33fccb0
commit 76ce814a62
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20

View File

@ -838,7 +838,7 @@ module Discourse
# 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