Create redis pool in server options when not supplied
This commit is contained in:
parent
5573dfda84
commit
aecb07b008
@ -34,8 +34,10 @@ var REQUEST_QUERY_PARAMS_WHITELIST = [
|
||||
];
|
||||
|
||||
module.exports = function(redisPool) {
|
||||
var redisOpts = redisPool ? {pool: redisPool} : global.environment.redis;
|
||||
var cartoData = require('cartodb-redis')(redisOpts),
|
||||
redisPool = redisPool
|
||||
|| require('redis-mpool')(_.extend(global.environment.redis, {name: 'windshaft:server_options'}));
|
||||
|
||||
var cartoData = require('cartodb-redis')({ pool: redisPool }),
|
||||
lzmaWorker = new LZMA(),
|
||||
queryTablesApi = new QueryTablesApi();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user