Implemented sequential task

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 11 years ago
parent 2c4db660cf
commit bd81d948c0
  1. 4
      BuildServer/lib/tasks/conditional.js
  2. 12
      BuildServer/lib/tasks/sequential.js

@ -11,9 +11,7 @@ module.exports = function (params, processor) {
return processor.done();
}
processor.processTask(params.task, function () {
processor.done();
});
processor.processTask(params.task, processor.done.bind(processor));
}
};
};

@ -0,0 +1,12 @@
"use strict";
var async = require("async");
module.exports = function (params, processor) {
var mapper = Function.bind.bind(processor.processTask, processor);
return {
process: function () {
async.series(params.tasks.map(function (element) { return mapper(element); }), processor.done.bind(processor));
}
};
};
Loading…
Cancel
Save