Skip to main content

Interface: RunPurgeCommand

Defined in: packages/workflow-engine/src/kernel/commands.ts:437

Retention: deletes terminal runs that finished at or before olderThan.

The kernel deletes each run through PersistenceCore.deleteRun, which takes stages, logs, artifacts and annotations with it. After commit it clears the StepLedger for every stage record, removes the job rows and deletes the run's blobs (stage outputs, artifacts, spilled job payloads and step results under the engine's own key prefixes). A run reopened during the sweep is kept. Emits no events. Bounded by limit so a tick stays short; repeat until purged is 0.

Properties​

limit?​

readonly optional limit?: number

Defined in: packages/workflow-engine/src/kernel/commands.ts:444

Maximum runs deleted per call. Defaults to 100.


olderThan​

readonly olderThan: Date

Defined in: packages/workflow-engine/src/kernel/commands.ts:440

Runs whose completedAt (or, lacking one, updatedAt) is at or before this are eligible.


statuses?​

readonly optional statuses?: readonly PurgeableRunStatus[]

Defined in: packages/workflow-engine/src/kernel/commands.ts:442

Defaults to all three terminal statuses.


type​

readonly type: "run.purge"

Defined in: packages/workflow-engine/src/kernel/commands.ts:438