UNPKG

flowed

Version:

A fast and reliable flow engine for orchestration and more uses in *Node.js*, *Deno* and the browser

26 lines 870 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FlowStopping = void 0; const _1 = require("."); const types_1 = require("../../types"); class FlowStopping extends _1.FlowState { getStateCode() { return types_1.FlowStateEnum.Stopping; } stopped(error = false) { this.setState(types_1.FlowStateEnum.Stopped); if (error) { this.log({ n: this.runStatus.id, m: 'Flow stopped with error.', e: 'FT' }); this.execFinishReject(error); } else { this.log({ n: this.runStatus.id, m: 'Flow stopped.', e: 'FT' }); this.execFinishResolve(); } } postProcessFinished(error, _stopFlowExecutionOnError) { this.runStatus.state.stopped(error); } } exports.FlowStopping = FlowStopping; //# sourceMappingURL=flow-stopping.js.map