From d1c01fe80b3dc94a82a62b563dbda3ebd751a033 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Fri, 12 Jan 2018 13:37:20 +0000 Subject: Remove direct redis integration --- lib/gitlab_net.rb | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'lib/gitlab_net.rb') 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) -- cgit v1.2.1