From 7f7359b1381d376b81fd9b81120d8cfa0231a526 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 9 May 2016 00:21:10 -0700 Subject: Use Redis Ruby client instead of shelling out to redis-cli Closes gitlab-org/gitlab-ce#17329 --- lib/gitlab_config.rb | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'lib/gitlab_config.rb') diff --git a/lib/gitlab_config.rb b/lib/gitlab_config.rb index 831f0e3..ebf72d6 100644 --- a/lib/gitlab_config.rb +++ b/lib/gitlab_config.rb @@ -54,26 +54,4 @@ class GitlabConfig def git_annex_enabled? @config['git_annex_enabled'] ||= false end - - # Build redis command to write update event in gitlab queue - def redis_command - if redis.empty? - # Default to old method of connecting to redis - # for users that haven't updated their configuration - %W(env -i redis-cli) - else - redis['database'] ||= 0 - redis['host'] ||= '127.0.0.1' - redis['port'] ||= '6379' - if redis.has_key?("socket") - %W(#{redis['bin']} -s #{redis['socket']} -n #{redis['database']}) - else - if redis.has_key?("pass") - %W(#{redis['bin']} -h #{redis['host']} -p #{redis['port']} -n #{redis['database']} -a #{redis['pass']}) - else - %W(#{redis['bin']} -h #{redis['host']} -p #{redis['port']} -n #{redis['database']}) - end - end - end - end end -- cgit v1.2.1