Update redis.rb

This commit is contained in:
admin 2021-01-14 04:33:49 +00:00
parent ddfafa7d53
commit 1ed29ddd53
1 changed files with 5 additions and 2 deletions

View File

@ -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 }