HephaestusOban.StepResults (hephaestus_oban v0.5.0)

Copy Markdown View Source

Persistence helpers for hephaestus_step_results.

Step executions and resume events are recorded here before AdvanceWorker applies them back to the workflow instance. The final insert/7 argument is workflow_version, which defaults to 1 in the convenience overloads and is persisted with each step result row.

Summary

Functions

exists?(repo, instance_id, step_ref)

insert(repo, instance_id, step_ref, event, context_updates)

Inserts a step result with default metadata updates and workflow_version 1.

insert(repo, instance_id, step_ref, event, context_updates, metadata_updates)

Inserts a step result with explicit metadata updates and workflow_version 1.

insert(repo, instance_id, step_ref, event, context_updates, metadata_updates, workflow_version)

Inserts a step result row.

workflow_version should match the version stored on the workflow instance so later analysis can correlate persisted results with the workflow revision that produced them.

mark_processed(repo, results)

pending_for(repo, instance_id)