parent
41abebcbce
commit
a01488ae67
|
@ -1,7 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
if GlobalSetting.skip_redis?
|
||||
Rails.logger = Rails.logger.chained.first
|
||||
if Rails.logger.respond_to? :chained
|
||||
Rails.logger = Rails.logger.chained.first
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -142,6 +144,8 @@ RailsMultisite::ConnectionManagement.each_connection do
|
|||
end
|
||||
|
||||
if Rails.configuration.multisite
|
||||
chained = Rails.logger.chained
|
||||
chained && chained.first.formatter = RailsMultisite::Formatter.new
|
||||
if Rails.logger.respond_to? :chained
|
||||
chained = Rails.logger.chained
|
||||
chained && chained.first.formatter = RailsMultisite::Formatter.new
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,9 +26,9 @@ task 'db:force_skip_persist' do
|
|||
GlobalSetting.skip_redis = true
|
||||
end
|
||||
|
||||
task 'db:create' do |_, args|
|
||||
if MultisiteTestHelpers.load_multisite?
|
||||
system("RAILS_DB=discourse_test_multisite rake db:create")
|
||||
task 'db:create' => [:load_config] do |_, args|
|
||||
if !ENV['RAILS_ENV']
|
||||
system("RAILS_ENV=test RAILS_DB=discourse_test_multisite rake db:create")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue