Pipeline.CheckpointManager (pipeline v0.0.1)
View SourceManages checkpoint creation and restoration for pipeline execution.
Provides state persistence to allow pipeline resumption after failures or interruptions.
Summary
Functions
Delete old checkpoints, keeping only the most recent N.
Get checkpoint metadata without loading the full data.
List all checkpoints for a workflow.
Load a specific checkpoint by filename.
Load the latest checkpoint for a workflow.
Save a checkpoint for the current pipeline state.
Types
@type checkpoint_data() :: %{ workflow_name: String.t(), step_index: non_neg_integer(), results: map(), execution_log: list(), timestamp: DateTime.t(), variable_state: map() }
Functions
@spec cleanup_old_checkpoints(String.t(), String.t(), pos_integer()) :: :ok | {:error, any()}
Delete old checkpoints, keeping only the most recent N.
Get checkpoint metadata without loading the full data.
List all checkpoints for a workflow.
@spec load_checkpoint(String.t(), String.t()) :: {:ok, checkpoint_data()} | {:error, any()}
Load a specific checkpoint by filename.
@spec load_latest(String.t(), String.t()) :: {:ok, checkpoint_data()} | {:error, any()}
Load the latest checkpoint for a workflow.
Save a checkpoint for the current pipeline state.