From 0a24df3371c4af2a2b1e6a61a3048c80cd51536c Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Thu, 18 Aug 2016 12:23:48 +0200 Subject: Sentinel connection parameters in `config.yml` file --- lib/gitlab_net.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/gitlab_net.rb') diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb index c06ed1e..35a8833 100644 --- a/lib/gitlab_net.rb +++ b/lib/gitlab_net.rb @@ -81,6 +81,12 @@ class GitlabNet 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") -- cgit v1.2.1