File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 3131 port: 6379
3232 # pass: redispass # Allows you to specify the password for Redis
3333 # socket: /tmp/redis.socket # Only define this if you want to use sockets
34+ database: 0
3435 namespace: resque:gitlab
3536
3637# Log file.
Original file line number Diff line number Diff line change @@ -54,13 +54,14 @@ def redis_command
5454 # for users that haven't updated their configuration
5555 %W( env -i redis-cli )
5656 else
57+ redis [ 'database' ] ||= 0
5758 if redis . has_key? ( "socket" )
58- %W( #{ redis [ 'bin' ] } -s #{ redis [ 'socket' ] } )
59+ %W( #{ redis [ 'bin' ] } -s #{ redis [ 'socket' ] } -n #{ redis [ 'database' ] } )
5960 else
6061 if redis . has_key? ( "pass" )
61- %W( #{ redis [ 'bin' ] } -h #{ redis [ 'host' ] } -p #{ redis [ 'port' ] } -a #{ redis [ 'pass' ] } )
62+ %W( #{ redis [ 'bin' ] } -h #{ redis [ 'host' ] } -p #{ redis [ 'port' ] } -n #{ redis [ 'database' ] } - a #{ redis [ 'pass' ] } )
6263 else
63- %W( #{ redis [ 'bin' ] } -h #{ redis [ 'host' ] } -p #{ redis [ 'port' ] } )
64+ %W( #{ redis [ 'bin' ] } -h #{ redis [ 'host' ] } -p #{ redis [ 'port' ] } -n #{ redis [ 'database' ] } )
6465 end
6566 end
6667 end
Original file line number Diff line number Diff line change 1111 it { should have_key ( 'bin' ) }
1212 it { should have_key ( 'host' ) }
1313 it { should have_key ( 'port' ) }
14+ it { should have_key ( 'database' ) }
1415 it { should have_key ( 'namespace' ) }
1516 end
1617
You can’t perform that action at this time.
0 commit comments