Skip to content

Commit dfeee35

Browse files
authored
Merge pull request Automattic#1013 from moustacheful/master
Add support for specifying database via querystring on redis URL
2 parents 06c765b + a0628e7 commit dfeee35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/redis.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ exports.configureFactory = function( options, queue ) {
3232
options.redis = {
3333
port: conn_info.port || 6379,
3434
host: conn_info.hostname,
35-
db: (conn_info.pathname ? conn_info.pathname.substr(1) : null) || 0,
35+
db: (conn_info.pathname ? conn_info.pathname.substr(1) : null) || conn_info.query.db || 0,
3636
// see https://github.com/mranney/node_redis#rediscreateclient
3737
options: conn_info.query
3838
};

0 commit comments

Comments
 (0)