From 1ed29ddd53e89bb2cce06d18b794d5f3dd649dbe Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 14 Jan 2021 04:33:49 +0000 Subject: [PATCH] Update redis.rb --- config/initializers/redis.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/initializers/redis.rb b/config/initializers/redis.rb index 7573fc9f..0ae37b6a 100644 --- a/config/initializers/redis.rb +++ b/config/initializers/redis.rb @@ -1,9 +1,12 @@ # frozen_string_literal: true +require 'connection_pool' -redis_connection = Redis.new( + + +redis_connection = ConnectionPool::Wrapper.new(size: ENV['REDIS_POOL_SIZE'], timeout: 10) { Redis.new( url: ENV['REDIS_URL'], driver: :hiredis -) +)} namespace = ENV.fetch('REDIS_NAMESPACE') { nil }