Squidie.Runtime.Journal.Replay (squidie v0.1.2)

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, map()}
  | {:invalid_replay_source,
     :workflow
     | :trigger
     | :runtime_spec
     | :missing_input
     | {:missing_recovery, term()}}
  | {:invalid_replay_source, :workflow, term()}
  | {:unsafe_replay, map()}
  | Squidie.Runtime.Journal.Starter.start_error()

Functions

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

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

Starts a new journal run from a prior journal run.