flowed
Version:
A fast and reliable flow engine for orchestration and more uses in *Node.js*, *Deno* and the browser
25 lines • 961 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProcessManager = void 0;
const task_process_1 = require("./task-process");
class ProcessManager {
constructor() {
this.nextProcessId = 1;
this.processes = [];
}
createProcess(task, taskResolverExecutor, context, automapParams, automapResults, flowId, debug, log) {
this.nextProcessId++;
const process = new task_process_1.TaskProcess(this, this.nextProcessId, task, taskResolverExecutor, context, automapParams, automapResults, flowId, debug, log);
this.processes.push(process);
return process;
}
runningCount() {
return this.processes.length;
}
removeProcess(process) {
const processIndex = this.processes.findIndex(p => p.id === process.id);
this.processes.splice(processIndex, 1);
}
}
exports.ProcessManager = ProcessManager;
//# sourceMappingURL=process-manager.js.map