Commit 93549d9d authored by GitLab's avatar GitLab

Added socket support to redis configuration directive per drf's request at...

Added socket support to redis configuration directive per drf's request at https://github.com/gitlabhq/gitlab-shell/pull/35
parent 9940836b
...@@ -51,9 +51,12 @@ class GitlabUpdate ...@@ -51,9 +51,12 @@ class GitlabUpdate
end end
def update_redis 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'" 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 else
# Default to old method of connecting to redis for users that haven't updated their configuration
redis_commend = "env -i redis-cli" redis_commend = "env -i redis-cli"
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment