flowed
Version:
A fast and reliable flow engine for orchestration and more uses in *Node.js*, *Deno* and the browser
28 lines • 857 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlowPaused = void 0;
const _1 = require(".");
const types_1 = require("../../types");
class FlowPaused extends _1.FlowState {
getStateCode() {
return types_1.FlowStateEnum.Paused;
}
resume() {
this.setState(types_1.FlowStateEnum.Running);
this.createFinishPromise();
this.startReadyTasks();
if (!this.runStatus.state.isRunning()) {
this.runStatus.state.finished();
}
return this.runStatus.finishPromise;
}
stop() {
this.setState(types_1.FlowStateEnum.Stopping);
return Promise.resolve(this.getResults());
}
getSerializableState() {
return this.runStatus.toSerializable();
}
}
exports.FlowPaused = FlowPaused;
//# sourceMappingURL=flow-paused.js.map