Update redis.rb
This commit is contained in:
parent
ddfafa7d53
commit
1ed29ddd53
|
@ -1,9 +1,12 @@
|
||||||
# frozen_string_literal: true
|
# 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'],
|
url: ENV['REDIS_URL'],
|
||||||
driver: :hiredis
|
driver: :hiredis
|
||||||
)
|
)}
|
||||||
|
|
||||||
namespace = ENV.fetch('REDIS_NAMESPACE') { nil }
|
namespace = ENV.fetch('REDIS_NAMESPACE') { nil }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue