more mongo and redis stuff

This commit is contained in:
Baris Soner Usakli
2013-12-04 16:58:06 -05:00
parent 53a7eab3e8
commit 2e2938616d
7 changed files with 58 additions and 32 deletions

View File

@@ -170,6 +170,18 @@
redisClient.hgetall(key, callback);
}
module.getObjects = function(keys, callback) {
var multi = redisClient.multi();
for(var x=0; x<keys.length; ++x) {
multi.hgetall(keys[x]);
}
multi.exec(function (err, replies) {
callback(err, replies);
});
}
module.getObjectField = function(key, field, callback) {
module.getObjectFields(key, [field], function(err, data) {
if(err) {