diff options
-rw-r--r-- | config.yml.example | 1 | ||||
-rw-r--r-- | lib/gitlab_config.rb | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/config.yml.example b/config.yml.example index bc41c25..972b539 100644 --- a/config.yml.example +++ b/config.yml.example @@ -29,6 +29,7 @@ redis: bin: /usr/bin/redis-cli host: 127.0.0.1 port: 6379 + # pass: redispass # Allows you to specify the password for Redis # socket: /tmp/redis.socket # Only define this if you want to use sockets namespace: resque:gitlab diff --git a/lib/gitlab_config.rb b/lib/gitlab_config.rb index ad15247..816da2c 100644 --- a/lib/gitlab_config.rb +++ b/lib/gitlab_config.rb @@ -53,7 +53,11 @@ class GitlabConfig if redis.has_key?("socket") %W(#{redis['bin']} -s #{redis['socket']}) else - %W(#{redis['bin']} -h #{redis['host']} -p #{redis['port']}) + if redis.has_key?("pass") + %W(#{redis['bin']} -h #{redis['host']} -p #{redis['port']} -a #{redis['pass']}) + else + %W(#{redis['bin']} -h #{redis['host']} -p #{redis['port']}) + end end end end |