diff options
author | Robert Speicher <robert@gitlab.com> | 2016-08-19 18:55:30 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-08-19 18:55:30 +0000 |
commit | 3043b31c458bf720843a84b35c9fbad5c1488c1d (patch) | |
tree | b90e1df74cc8c53c891f06912e65575fd0f2be48 /lib | |
parent | 4f8e91fac043f09ea94a3542eeff9734db33645a (diff) | |
parent | ee684a0973b2f5fbb30fcf2f1b3099564ca15ac9 (diff) | |
download | gitlab-shell-3.4.0.tar.gz |
Merge branch 'feature/redis-sentinel' into 'master'
v3.4.0
Sentinel Support
Sentinel connection parameters in `config.yml` file.
Fixes #29
See merge request !85
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab_net.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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") |