Update hiredis driver and add a default REDIS_POOL_SIZE
This commit is contained in:
parent
919eb87d47
commit
c9da516af6
2
Gemfile
2
Gemfile
@ -70,7 +70,7 @@ gem 'rack-attack', '~> 6.0'
|
|||||||
gem 'rack-cors', '~> 1.0', require: 'rack/cors'
|
gem 'rack-cors', '~> 1.0', require: 'rack/cors'
|
||||||
gem 'rails-i18n', '~> 5.1'
|
gem 'rails-i18n', '~> 5.1'
|
||||||
gem 'rails-settings-cached', '~> 0.6'
|
gem 'rails-settings-cached', '~> 0.6'
|
||||||
gem 'redis', '~> 4.1', require: ['redis', 'redis/connection/hiredis']
|
gem 'redis', '~> 4.2', require: ['redis', 'redis/connection/hiredis']
|
||||||
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
|
gem 'mario-redis-lock', '~> 1.2', require: 'redis_lock'
|
||||||
gem 'rqrcode', '~> 0.10'
|
gem 'rqrcode', '~> 0.10'
|
||||||
gem 'sanitize', '~> 5.0'
|
gem 'sanitize', '~> 5.0'
|
||||||
|
@ -754,7 +754,7 @@ DEPENDENCIES
|
|||||||
rails-settings-cached (~> 0.6)
|
rails-settings-cached (~> 0.6)
|
||||||
rdf-normalize (~> 0.3)
|
rdf-normalize (~> 0.3)
|
||||||
redcarpet (~> 3.4)
|
redcarpet (~> 3.4)
|
||||||
redis (~> 4.1)
|
redis (~> 4.2)
|
||||||
redis-namespace (~> 1.5)
|
redis-namespace (~> 1.5)
|
||||||
redis-rails (~> 5.0)
|
redis-rails (~> 5.0)
|
||||||
rqrcode (~> 0.10)
|
rqrcode (~> 0.10)
|
||||||
|
@ -3,7 +3,7 @@ require 'connection_pool'
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
redis_connection = ConnectionPool::Wrapper.new(size: ENV['REDIS_POOL_SIZE'], timeout: 10) { Redis.new(
|
redis_connection = ConnectionPool::Wrapper.new(size: ENV['REDIS_POOL_SIZE'] || 5, timeout: 10) { Redis.new(
|
||||||
url: ENV['REDIS_URL'],
|
url: ENV['REDIS_URL'],
|
||||||
driver: :hiredis
|
driver: :hiredis
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user