Skip to content

@persistent-ai/fireflow-executor / server / IExecutionStore

Interface: IExecutionStore

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:32

Properties

batchGetDirectChildren

batchGetDirectChildren: (parentIds) => Promise<ChildFeedItem[]>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:63

Parameters

parentIds

string[]

Returns

Promise<ChildFeedItem[]>


claimExecution

claimExecution: (executionId, workerId, timeoutMs) => Promise<boolean>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:67

Parameters

executionId

string

workerId

string

timeoutMs

number

Returns

Promise<boolean>


create

create: (instance) => Promise<void>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:33

Parameters

instance
commitHash

string

completedAt

Date | null

createdAt

Date

errorMessage

string | null

errorNodeId

string | null

executionDepth

number

externalEvents

object[] | null

failureCount

number

flowId

string

id

string

integration

object & object | null

lastFailureAt

Date | null

lastFailureReason

string | null

options

{ breakpoints?: string[]; debug?: boolean; execution?: { flowTimeoutMs?: number; maxConcurrency?: number; nodeTimeoutMs?: number; }; } | null

ownerId

string

parentExecutionId

string | null

path

string

processingStartedAt

Date | null

processingWorkerId

string | null

ref

string

rootExecutionId

string | null

startedAt

Date | null

status

ExecutionStatus

updatedAt

Date

workspaceId

string

Returns

Promise<void>


delete

delete: (id) => Promise<boolean>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:35

Parameters

id

string

Returns

Promise<boolean>


expireOldClaims

expireOldClaims: () => Promise<number>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:72

Returns

Promise<number>


extendClaim

extendClaim: (executionId, workerId, timeoutMs) => Promise<boolean>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:69

Parameters

executionId

string

workerId

string

timeoutMs

number

Returns

Promise<boolean>


get

get: (id) => Promise<{ commitHash: string; completedAt: Date | null; createdAt: Date; errorMessage: string | null; errorNodeId: string | null; executionDepth: number; externalEvents: object[] | null; failureCount: number; flowId: string; id: string; integration: object & object | null; lastFailureAt: Date | null; lastFailureReason: string | null; options: { breakpoints?: string[]; debug?: boolean; execution?: { flowTimeoutMs?: number; maxConcurrency?: number; nodeTimeoutMs?: number; }; } | null; ownerId: string; parentExecutionId: string | null; path: string; processingStartedAt: Date | null; processingWorkerId: string | null; ref: string; rootExecutionId: string | null; startedAt: Date | null; status: ExecutionStatus; updatedAt: Date; workspaceId: string; } | null>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:34

Parameters

id

string

Returns

Promise<{ commitHash: string; completedAt: Date | null; createdAt: Date; errorMessage: string | null; errorNodeId: string | null; executionDepth: number; externalEvents: object[] | null; failureCount: number; flowId: string; id: string; integration: object & object | null; lastFailureAt: Date | null; lastFailureReason: string | null; options: { breakpoints?: string[]; debug?: boolean; execution?: { flowTimeoutMs?: number; maxConcurrency?: number; nodeTimeoutMs?: number; }; } | null; ownerId: string; parentExecutionId: string | null; path: string; processingStartedAt: Date | null; processingWorkerId: string | null; ref: string; rootExecutionId: string | null; startedAt: Date | null; status: ExecutionStatus; updatedAt: Date; workspaceId: string; } | null>


getActiveClaims

getActiveClaims: () => Promise<ExecutionClaim[]>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:70

Returns

Promise<ExecutionClaim[]>


getChildExecutions

getChildExecutions: (parentId) => Promise<object[]>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:51

Parameters

parentId

string

Returns

Promise<object[]>


getChildFeed

getChildFeed: (rootExecutionId, limit, cursor?) => Promise<{ items: ChildFeedItem[]; nextCursor: string | null; }>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:53

Parameters

rootExecutionId

string

limit

number

cursor?

Date

Returns

Promise<{ items: ChildFeedItem[]; nextCursor: string | null; }>


getClaimForExecution

getClaimForExecution: (executionId) => Promise<ExecutionClaim | null>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:71

Parameters

executionId

string

Returns

Promise<ExecutionClaim | null>


getDirectChildFeed

getDirectChildFeed: (parentExecutionId, limit, cursor?) => Promise<{ items: ChildFeedItem[]; nextCursor: string | null; }>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:58

Parameters

parentExecutionId

string

limit

number

cursor?

Date

Returns

Promise<{ items: ChildFeedItem[]; nextCursor: string | null; }>


getExecutionsNeedingRecovery

getExecutionsNeedingRecovery: (limit?) => Promise<object[]>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:81

Parameters

limit?

number

Returns

Promise<object[]>


getExecutionStats

getExecutionStats: (rootExecutionId) => Promise<ExecutionStats>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:64

Parameters

rootExecutionId

string

Returns

Promise<ExecutionStats>


getExecutionTree

getExecutionTree: (rootId) => Promise<ExecutionTreeNode[]>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:52

Parameters

rootId

string

Returns

Promise<ExecutionTreeNode[]>


getRecoveryHistory

getRecoveryHistory: (executionId) => Promise<object[]>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:91

Parameters

executionId

string

Returns

Promise<object[]>


getRootExecutions

getRootExecutions: (coordinate, limit?, after?) => Promise<RootExecution[]>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:46

Parameters

coordinate
path

string

ref?

string

workspaceId

string

limit?

number

after?

Date | null

Returns

Promise<RootExecution[]>


recordRecovery

recordRecovery: (executionId, workerId, reason, previousStatus?, previousWorkerId?) => Promise<void>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:83

Parameters

executionId

string

workerId

string

reason

string

previousStatus?

string

previousWorkerId?

string

Returns

Promise<void>


releaseExecution

releaseExecution: (executionId, workerId) => Promise<void>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:68

Parameters

executionId

string

workerId

string

Returns

Promise<void>


releaseRecoveryLock

releaseRecoveryLock: (lockId) => Promise<void>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:95

Parameters

lockId

number

Returns

Promise<void>


tryAcquireRecoveryLock

tryAcquireRecoveryLock: (lockId) => Promise<boolean>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:94

Parameters

lockId

number

Returns

Promise<boolean>


updateExecutionStatus

updateExecutionStatus: (params) => Promise<boolean>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:36

Parameters

params

UpdateExecutionStatusParams

Returns

Promise<boolean>


updateExecutionStatusIfNotTerminal

updateExecutionStatusIfNotTerminal: (params) => Promise<boolean>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:43

Like updateExecutionStatus, but only updates the row if it is NOT already in a terminal state (completed/failed/stopped). Returns false (no-op) when the row is already terminal. Used for the guaranteed terminal-status write in the workflow finally block, which must run even on the cancel path where DBOS steps throw — see runFireFlowExecution.

Parameters

params

UpdateExecutionStatusParams

Returns

Promise<boolean>


updateFailureInfo

updateFailureInfo: (executionId, failureCount, reason) => Promise<boolean>

Defined in: packages/fireflow-executor/server/stores/interfaces/IExecutionStore.ts:75

Parameters

executionId

string

failureCount

number

reason

string

Returns

Promise<boolean>

Licensed under BUSL-1.1