From 76ce814a62033296156d9e0886117ef283e1e9f2 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 3 Jun 2020 15:36:50 +0800 Subject: [PATCH] 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. --- lib/discourse.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/discourse.rb b/lib/discourse.rb index 27c28e199d5..5da2acb15e9 100644 --- a/lib/discourse.rb +++ b/lib/discourse.rb @@ -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