Fixed a bug in task-processor

At the moment of call to taskImpl, processor should be created
dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 11 years ago
parent 4cb189e1a2
commit 19b63321dd
  1. 7
      BuildServer/lib/task-processor.js

@ -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) {

Loading…
Cancel
Save