Fix opening and closing Redis connections instead of using a pool (#18171)
* Fix opening and closing Redis connections instead of using a pool * Fix Redis connections not being returned to the pool in CLI commands
This commit is contained in:
		@@ -1,4 +1,6 @@
 | 
			
		||||
require 'stoplight'
 | 
			
		||||
 | 
			
		||||
Stoplight::Light.default_data_store = Stoplight::DataStore::Redis.new(RedisConfiguration.new.connection)
 | 
			
		||||
Stoplight::Light.default_notifiers  = [Stoplight::Notifier::Logger.new(Rails.logger)]
 | 
			
		||||
Rails.application.reloader.to_prepare do
 | 
			
		||||
  Stoplight::Light.default_data_store = Stoplight::DataStore::Redis.new(RedisConfiguration.new.connection)
 | 
			
		||||
  Stoplight::Light.default_notifiers  = [Stoplight::Notifier::Logger.new(Rails.logger)]
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user