diff options
Diffstat (limited to 'lib/gitlab_net.rb')
-rw-r--r-- | lib/gitlab_net.rb | 25 |
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) |