SquidMesh.Runtime.Journal.Replay (squid_mesh v0.1.0-beta.3)

Copy Markdown View Source

Journal-backed workflow replay.

Replay rebuilds the source run from its durable run thread, checks completed steps against the recovery policy persisted with each runnable, then starts a fresh journal run through the normal journal starter. The replayed run stores the source run id as lineage metadata on its :run_started fact.

Summary

Functions

Starts a new journal run from a prior journal run.

Types

replay_error()

@type replay_error() ::
  :not_found
  | :invalid_run_id
  | {:invalid_option, term()}
  | {:incompatible_workflow_definition, :replay}
  | {:invalid_replay_source,
     :workflow | :trigger | :missing_input | {:missing_recovery, term()}}
  | {:unsafe_replay, map()}
  | SquidMesh.Runtime.Journal.Starter.start_error()

Functions

replay(run_id, replay_opts \\ [], config_opts \\ [])

@spec replay(String.t(), keyword(), keyword()) ::
  {:ok, SquidMesh.ReadModel.Inspection.Snapshot.t()} | {:error, replay_error()}

Starts a new journal run from a prior journal run.