durable-execution - v0.32.0
    Preparing search index...

    Type Alias TaskExecutionStorageValue

    Complete storage representation of a task execution including all metadata, relationships and state tracking fields.

    This type represents the full database record for a task execution. All fields are used internally by the executor for state management, recovery and coordination.

    • Identity: taskId, executionId, root, parent
    • Configuration: retryOptions, timeoutMs, sleepMsBeforeRun
    • State: status, isFinished, input, output, error
    • Timing: startAt, startedAt, expiresAt, finishedAt, etc.
    • Relationships: children, finalize, activeChildrenCount
    • Recovery: closeStatus, onChildrenFinishedProcessingStatus, needsPromiseCancellation
    type TaskExecutionStorageValue = {
        root?: TaskExecutionSummary;
        parent?: ParentTaskExecutionSummary;
        taskId: string;
        executionId: string;
        isSleepingTask: boolean;
        sleepingTaskUniqueId?: string;
        retryOptions: TaskRetryOptions;
        sleepMsBeforeRun: number;
        timeoutMs: number;
        areChildrenSequential: boolean;
        input: string;
        executorId?: string;
        status: TaskExecutionStatus;
        isFinished: boolean;
        runOutput?: string;
        output?: string;
        error?: DurableExecutionErrorStorageValue;
        retryAttempts: number;
        startAt: number;
        startedAt?: number;
        expiresAt?: number;
        waitingForChildrenStartedAt?: number;
        waitingForFinalizeStartedAt?: number;
        finishedAt?: number;
        children?: TaskExecutionSummary[];
        activeChildrenCount: number;
        onChildrenFinishedProcessingStatus: TaskExecutionOnChildrenFinishedProcessingStatus;
        onChildrenFinishedProcessingExpiresAt?: number;
        onChildrenFinishedProcessingFinishedAt?: number;
        finalize?: TaskExecutionSummary;
        closeStatus: TaskExecutionCloseStatus;
        closeExpiresAt?: number;
        closedAt?: number;
        needsPromiseCancellation: boolean;
        createdAt: number;
        updatedAt: number;
    }
    Index

    Properties

    The root task execution.

    The parent task execution.

    taskId: string

    The id of the task.

    executionId: string

    The id of the execution.

    isSleepingTask: boolean

    Whether the task execution is a sleeping task execution.

    sleepingTaskUniqueId?: string

    The unique id of the sleeping task execution. It is only present for sleeping task executions.

    retryOptions: TaskRetryOptions

    The retry options of the task execution.

    sleepMsBeforeRun: number

    The sleep ms before run of the task execution.

    timeoutMs: number

    The timeout ms of the task execution.

    areChildrenSequential: boolean

    Whether the children task executions are sequential. It is only present for waiting_for_children status.

    input: string

    The input of the task execution.

    executorId?: string

    The id of the executor.

    The status of the execution.

    isFinished: boolean

    Whether the execution is finished. Set on finish.

    runOutput?: string

    The run output of the task execution. Deleted after the task execution is finished.

    output?: string

    The output of the task execution.

    The error of the execution.

    retryAttempts: number

    The number of attempts the execution has been retried.

    startAt: number

    The start time of the task execution. Used for delaying the execution. Set on enqueue.

    startedAt?: number

    The time the task execution started. Set on start.

    expiresAt?: number

    The time the task execution expires. It is used to recover from process failures. Set on start.

    waitingForChildrenStartedAt?: number

    The time the task execution waiting for children starts.

    waitingForFinalizeStartedAt?: number

    The time the task execution waiting for finalize starts.

    finishedAt?: number

    The time the task execution finished. Set on finish.

    The children task executions of the execution. It is only present for waiting_for_children status.

    activeChildrenCount: number

    The number of active children task executions. It is only present for waiting_for_children status.

    onChildrenFinishedProcessingStatus: TaskExecutionOnChildrenFinishedProcessingStatus

    The status of the on children finished processing.

    onChildrenFinishedProcessingExpiresAt?: number

    The time the on children finished processing expires. It is used to recover from process failures. Set on on children finished processing start.

    onChildrenFinishedProcessingFinishedAt?: number

    The time the on children task executions finished processing finished. Set after on children finished processing finishes.

    The finalize task execution of the execution.

    Whether the execution is closed. Once the execution is finished, the closing process will update this field in the background.

    closeExpiresAt?: number

    The time the task execution close expires. It is used to recover from process failures. Set on closing process start.

    closedAt?: number

    The time the task execution was closed. Set on closing process finish.

    needsPromiseCancellation: boolean

    Whether the execution needs a promise cancellation. Set on cancellation.

    createdAt: number

    The time the task execution was created.

    updatedAt: number

    The time the task execution was updated.