diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-26 21:07:52 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-26 21:07:52 +0000 |
commit | 03a70b84edfb86bc27f9234e1f1d157d3a33c555 (patch) | |
tree | d8df46fee3e5a97d3b9dbd7d2e69ccc9e3601de1 /lib/gitlab/redis | |
parent | 165beade336f9049f95db3944b1c5c00a1e952cf (diff) | |
download | gitlab-ce-03a70b84edfb86bc27f9234e1f1d157d3a33c555.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/redis')
-rw-r--r-- | lib/gitlab/redis/wrapper.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/redis/wrapper.rb b/lib/gitlab/redis/wrapper.rb index c8932b26925..06ee81ba172 100644 --- a/lib/gitlab/redis/wrapper.rb +++ b/lib/gitlab/redis/wrapper.rb @@ -15,8 +15,11 @@ module Gitlab delegate :params, :url, to: :new def with + pool.with { |redis| yield redis } + end + + def pool @pool ||= ConnectionPool.new(size: pool_size) { ::Redis.new(params) } - @pool.with { |redis| yield redis } end def pool_size |