Skip to content

dag-runtime / Exports / RunCancelService

Class: RunCancelService

Service for cancelling active DAG runs via the state machine.

See

DagRunStateMachine for valid cancellation transitions

Table of contents

Constructors

Methods

Constructors

constructor

new RunCancelService(storage, clock): RunCancelService

Parameters

NameType
storageIStoragePort
clockIClockPort

Returns

RunCancelService

Defined in

services/run-cancel-service.ts:22

Methods

cancelRun

cancelRun(dagRunId): Promise<TResult<IRunCancelResult, IDagError>>

Cancels a DAG run if its current status allows the CANCEL transition.

Parameters

NameTypeDescription
dagRunIdstringThe unique identifier of the DAG run to cancel.

Returns

Promise<TResult<IRunCancelResult, IDagError>>

The cancelled run ID and status, or an error if the transition is invalid.

Defined in

services/run-cancel-service.ts:32

Released under the MIT License.