Retrieving db public user from redis. It uses a new multiget method from cartodb-redis
This commit is contained in:
parent
470aea22d9
commit
bfdcee3772
@ -559,21 +559,20 @@ module.exports = function(){
|
||||
dbport: global.environment.postgres.port
|
||||
});
|
||||
Step(
|
||||
function getDatabaseHost(){
|
||||
cartoData.getUserDBHost(dbowner, this);
|
||||
function getConnectionParams() {
|
||||
cartoData.getUserDBConnectionParams(dbowner, this);
|
||||
},
|
||||
function getDatabase(err, data){
|
||||
if(err) throw err;
|
||||
if ( data ) _.extend(params, {dbhost:data});
|
||||
cartoData.getUserDBName(dbowner, this);
|
||||
},
|
||||
function extendParams(err, data){
|
||||
function extendParams(err, dbParams){
|
||||
if (err) throw err;
|
||||
if ( data ) _.extend(params, {dbname:data});
|
||||
// we don't want null values or overwrite a non public user
|
||||
if (params.dbuser != 'publicuser' || !dbParams.dbuser) {
|
||||
delete dbParams.dbuser;
|
||||
}
|
||||
if ( dbParams ) _.extend(params, dbParams);
|
||||
return null;
|
||||
},
|
||||
function finish(err) {
|
||||
callback(err);
|
||||
callback(err);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
3
npm-shrinkwrap.json
generated
3
npm-shrinkwrap.json
generated
@ -934,7 +934,8 @@
|
||||
"version": "2.9.202"
|
||||
},
|
||||
"cartodb-redis": {
|
||||
"version": "0.3.0"
|
||||
"version": "0.5.0",
|
||||
"from": "git://github.com/CartoDB/node-cartodb-redis.git#0.5.0"
|
||||
},
|
||||
"redis-mpool": {
|
||||
"version": "0.0.4",
|
||||
|
@ -27,7 +27,7 @@
|
||||
"windshaft" : "http://github.com/CartoDB/Windshaft/tarball/0.21.0",
|
||||
"step": "0.0.x",
|
||||
"request": "2.9.202",
|
||||
"cartodb-redis": "~0.3.0",
|
||||
"cartodb-redis": "git://github.com/CartoDB/node-cartodb-redis.git#0.5.0",
|
||||
"redis-mpool": "http://github.com/CartoDB/node-redis-mpool/tarball/0.0.4",
|
||||
"mapnik": "http://github.com/Vizzuality/node-mapnik/tarball/0.7.26-cdb1",
|
||||
"lzma": "~1.2.3",
|
||||
|
Loading…
Reference in New Issue
Block a user