Skip to content
Français

recoverWorkflowCheckpoint

import { recoverWorkflowCheckpoint } from "@elie-laloum/outpost";

Clear the owner of a run’s checkpoint and keep its saved progress. Rejects with TransportConflict when the object is missing or its revision differs from revision. Stop the old runner first; its interrupted tasks rerun only with resume: “retry-incomplete”.

Complete example and detailed rules.

  • optionsRequired
    CheckpointRecoveryOptions
    Run and observed revision to unlock after the caller has independently stopped the previous runner.
  • options.runIdRequired
    string
    Run identity whose ownership is explicitly released; saved checkpoint values remain intact.
  • options.revisionRequired
    string
    Revision of the checkpoint object read after stopping the old runner; if the object changed since, recovery rejects with TransportConflict.
  • options.transporterRequired
    Transport
    Caller-owned object transport used by the store or operation. Closing a workflow or sandbox does not close this transport.

Promise<void>

export declare function recoverWorkflowCheckpoint(
  options: CheckpointRecoveryOptions,
): Promise<void>;