Commit d32c9829 authored by project's avatar project

--no commit message

--no commit message
parent afa3f33e
...@@ -186,30 +186,30 @@ var ag = { ...@@ -186,30 +186,30 @@ var ag = {
} }
// var JobTask = ctx.getLib('jobexecutor/lib/jobtask'); var JobTask = ctx.getLib('jobexecutor/lib/jobtask');
var job = new JobTask({
'handle' : handle,
'job_config' : job_config,
'input_data' : input_data
});
job.run();
// async.reduce([1,2,3], 0, function(memo, item, callback) {
// // pointless async:
// process.nextTick(function() {
// console.log(item);
// if(item==8){
// callback('err')
// }else{
// callback(null,item)
// }
// });
// }, function(err, result) {
// //
// var job = new JobTask({ // if(err){
// 'handle' : handle, // console.log(err);
// 'job_config' : job_config, // }else{
// 'input_data' : input_data // console.log(result);
// }
// }); // });
// job.run();
async.reduce([1,2,3], 0, function(memo, item, callback) {
// pointless async:
process.nextTick(function() {
console.log(item);
if(item==8){
callback('err')
}else{
callback(null,item)
}
});
}, function(err, result) {
// result is now equal to the last value of memo, which is 6
if(err){
console.log(err);
}else{
console.log(result);
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment