You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
362 B
18 lines
362 B
11 years ago
|
"use strict";
|
||
|
|
||
|
var async = require("async");
|
||
|
|
||
|
module.exports = function (params, processor) {
|
||
|
return {
|
||
|
process: function () {
|
||
|
async.parallel(params.tasks.map(function (task) {
|
||
|
return function (callback) {
|
||
|
return processor.processTask(task, function (err) {
|
||
|
return callback();
|
||
|
})
|
||
|
}
|
||
|
}), processor.done.bind(processor));
|
||
|
}
|
||
|
};
|
||
|
};
|