File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1111
1212var crypto = require ( 'crypto' )
1313 , Store = require ( '../store' )
14- , assert = require ( 'assert' )
15- , redis = require ( 'redis' ) ;
14+ , assert = require ( 'assert' ) ;
1615
1716/**
1817 * Exports the constructor.
@@ -25,6 +24,7 @@ Redis.Client = Client;
2524 * Redis store.
2625 * Options:
2726 * - nodeId (fn) gets an id that uniquely identifies this node
27+ * - redis (fn) redis constructor, defaults to redis
2828 * - redisPub (object) options to pass to the pub redis client
2929 * - redisSub (object) options to pass to the sub redis client
3030 * - redisClient (object) options to pass to the general redis client
@@ -60,6 +60,8 @@ function Redis (opts) {
6060 }
6161 }
6262
63+ var redis = opts . redis || require ( 'redis' ) ;
64+
6365 // initialize a pubsub client and a regular client
6466 this . pub = redis . createClient ( opts . redisPub ) ;
6567 this . sub = redis . createClient ( opts . redisSub ) ;
You can’t perform that action at this time.
0 commit comments