Commit d32c9829 authored by project's avatar project

--no commit message

--no commit message
parent afa3f33e
......@@ -186,30 +186,30 @@ var ag = {
}
// 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) {
// result is now equal to the last value of memo, which is 6
if(err){
console.log(err);
}else{
console.log(result);
}
});
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) {
//
// 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