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.
17 lines
362 B
17 lines
362 B
"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));
|
|
}
|
|
};
|
|
};
|
|
|