DEV: Require `rails_failover` before global settings.

DEV: Require rails_failover before global settings.

diff --git a/config/application.rb b/config/application.rb
index 43a8bf3..ba44863 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -27,6 +27,10 @@ require_relative '../lib/discourse_plugin_registry'
 
 require_relative '../lib/plugin_gem'
 
+if ENV['RAILS_FAILOVER']
+  require 'rails_failover'
+end
+
 # Global config
 require_relative '../app/models/global_setting'
 GlobalSetting.configure!
diff --git a/config/initializers/001-redis.rb b/config/initializers/001-redis.rb
index 14ce997..f28c59a 100644
--- a/config/initializers/001-redis.rb
+++ b/config/initializers/001-redis.rb
@@ -6,8 +6,6 @@ if Rails.env.development? && ENV['DISCOURSE_FLUSH_REDIS']
 end
 
 if ENV['RAILS_FAILOVER']
-  require 'rails_failover'
-
   message_bus_keepalive_interval = MessageBus.keepalive_interval
 
   RailsFailover::Redis.register_master_up_callback do

GitHub sha: 2f03a879