I'm trying to use Async module with 2 functions, here is the code. There's something wrong, the console.dir are working, but the last one in function(err, results) doesn't work. Can any one help me?
The last step that I want to do is render the oftArrayFullInfo and oftNextInfo
async.parallel({
one: function(callback){
auxFunctions.foofunc1(foo1, foo1, function(oftArrayFullInfo){
console.log("****** ASYNC 1 ARRAY");
console.dir(oftArrayFullInfo);
callback(oftArrayFullInfo);
});
},
two: function(callback){
auxFunctions.foofunc2(foo1, foo1, function(oftNextInfo){
console.log("****** ASYNC 2 ARRAY");
console.dir(oftNextInfo);
callback(oftNextInfo);
});
}
},
function(err, results){
console.log("****** RENDER 1");
console.dir(results.one);
console.log("****** RENDER 2")
console.dir(results.two);
//res.render('myView', {title: 'Job Info', oftArrayFullInfo}, {title: 'Next Jobs Info', oftNextInfo});
});