diff options
author | GitLab <projects@quackenbush.me> | 2013-04-09 20:10:32 -0700 |
---|---|---|
committer | GitLab <projects@quackenbush.me> | 2013-04-09 20:10:32 -0700 |
commit | 93549d9dcfaa6154550a05ce5758ed0c1d1b2934 (patch) | |
tree | a9e4980080f1897930a8401d95d366c8eaab074d | |
parent | 9940836b1d2e76a0c2801c7ade8caf34f43379b6 (diff) | |
download | gitlab-shell-93549d9dcfaa6154550a05ce5758ed0c1d1b2934.tar.gz |
Added socket support to redis configuration directive per drf's request at https://github.com/gitlabhq/gitlab-shell/pull/35
-rw-r--r-- | lib/gitlab_update.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab_update.rb b/lib/gitlab_update.rb index 93f9c41..c222af3 100644 --- a/lib/gitlab_update.rb +++ b/lib/gitlab_update.rb @@ -51,9 +51,12 @@ class GitlabUpdate end def update_redis - if @redis.present? + if !@redis.empty? && !@redis.has_key?("socket") redis_command = "#{@redis['bin']} -h #{@redis['host']} -p #{@redis['port']} rpush '#{@redis['namespace']}:queue:post_receive'" + elsif !@redis.empty? && @redis.has_key?("socket") + redis_command = "#{@redis['bin']} -s #{@redis['socket']} rpush '#{@redis['namespace']}:queue:post_receive'" else + # Default to old method of connecting to redis for users that haven't updated their configuration redis_commend = "env -i redis-cli" end |