FEATURE: failsafe, in multisite if a site is bad still boot up

This commit is contained in:
Sam 2015-02-09 18:31:05 +11:00
parent 63404b16bb
commit a7cb93a5c3

View File

@ -9,6 +9,9 @@ reload_settings = lambda {
SiteSetting.refresh!
rescue ActiveRecord::StatementInvalid
# This will happen when migrating a new database
rescue => e
STDERR.puts "URGENT: #{e} Failed to initialize site #{RailsMultisite::ConnectionManagement.current_db}"
# the show must go on, don't stop startup if multisite fails
end
end
}