|
|
@ -7,8 +7,8 @@ var TaskProcessor = function (task, outerProcessor, callback) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var self = this, |
|
|
|
var self = this, |
|
|
|
taskImpl = require('./tasks/' + task.type.match(/[\w\-]/g).join("")), |
|
|
|
taskImpl, |
|
|
|
taskWorker = taskImpl(task.params, self), |
|
|
|
taskWorker, |
|
|
|
errors = [], |
|
|
|
errors = [], |
|
|
|
process = function () { |
|
|
|
process = function () { |
|
|
|
taskWorker.process(); |
|
|
|
taskWorker.process(); |
|
|
@ -41,6 +41,9 @@ var TaskProcessor = function (task, outerProcessor, callback) { |
|
|
|
self.processTask = processTask; |
|
|
|
self.processTask = processTask; |
|
|
|
self.done = done; |
|
|
|
self.done = done; |
|
|
|
self.context = outerProcessor.context; |
|
|
|
self.context = outerProcessor.context; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
taskImpl = require('./tasks/' + task.type.match(/[\w\-]/g).join("")); |
|
|
|
|
|
|
|
taskWorker = taskImpl(task.params, self); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
exports.processTask = function (task, context, callback) { |
|
|
|
exports.processTask = function (task, context, callback) { |
|
|
|