summaryrefslogtreecommitdiff
path: root/lib/gitlab/redis
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 21:07:52 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 21:07:52 +0000
commit03a70b84edfb86bc27f9234e1f1d157d3a33c555 (patch)
treed8df46fee3e5a97d3b9dbd7d2e69ccc9e3601de1 /lib/gitlab/redis
parent165beade336f9049f95db3944b1c5c00a1e952cf (diff)
downloadgitlab-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.rb5
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