pub async fn enqueue_workflow_run_tx(
tx: &mut DbTx<'_>,
payload: &WorkflowRunEnqueue<'_>,
) -> Result<WorkflowRunDbRecord>Expand description
Enqueues a workflow run and returns the existing run for an identical keyed retry.
Idempotency is strict for the submitted request snapshot. The snapshot is
compared instead of live workflow step rows because steps and dependencies
can be legitimately appended or mutated after initial enqueue. Strict
workflow idempotency applies to keyed rows with an enqueue_request
snapshot; unkeyed rows do not store snapshots, and keyed rows without
snapshots are rejected by the idempotency cutover.
Job-step stage is part of the canonical initial request after normalizing an
omitted stage to Queued; changing the requested initial stage is treated as
a different enqueue request.