summaryrefslogtreecommitdiff
path: root/lib/gitlab_net.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-01-12 13:37:20 +0000
committerNick Thomas <nick@gitlab.com>2018-01-12 13:58:15 +0000
commitd1c01fe80b3dc94a82a62b563dbda3ebd751a033 (patch)
treec9e1d0b73578704ed1beb619bd277794f05a0087 /lib/gitlab_net.rb
parent73e2cf531ca8b92dc48da5024c8095256aa10818 (diff)
downloadgitlab-shell-d1c01fe80b3dc94a82a62b563dbda3ebd751a033.tar.gz
Remove direct redis integration
Diffstat (limited to 'lib/gitlab_net.rb')
-rw-r--r--lib/gitlab_net.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb
index 34f10c5..924a784 100644
--- a/lib/gitlab_net.rb
+++ b/lib/gitlab_net.rb
@@ -5,7 +5,6 @@ require 'json'
require_relative 'gitlab_config'
require_relative 'gitlab_logger'
require_relative 'gitlab_access'
-require_relative 'gitlab_redis'
require_relative 'gitlab_lfs_authentication'
require_relative 'httpunix'
@@ -140,30 +139,6 @@ class GitlabNet
JSON.parse(resp.body) if resp.code == '200'
end
- def redis_client
- redis_config = config.redis
- database = redis_config['database'] || 0
- params = {
- host: redis_config['host'] || '127.0.0.1',
- port: redis_config['port'] || 6379,
- db: database
- }
-
- if redis_config.has_key?('sentinels')
- params[:sentinels] = redis_config['sentinels']
- .select { |s| s['host'] && s['port'] }
- .map { |s| { host: s['host'], port: s['port'] } }
- end
-
- if redis_config.has_key?("socket")
- params = { path: redis_config['socket'], db: database }
- elsif redis_config.has_key?("pass")
- params[:password] = redis_config['pass']
- end
-
- Redis.new(params)
- end
-
protected
def sanitize_path(repo)