summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab <projects@quackenbush.me>2013-04-09 20:10:32 -0700
committerGitLab <projects@quackenbush.me>2013-04-09 20:10:32 -0700
commit93549d9dcfaa6154550a05ce5758ed0c1d1b2934 (patch)
treea9e4980080f1897930a8401d95d366c8eaab074d
parent9940836b1d2e76a0c2801c7ade8caf34f43379b6 (diff)
downloadgitlab-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.rb5
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