Skip to main content

enqueue_workflow_run

Function enqueue_workflow_run 

Source
pub async fn enqueue_workflow_run(
    pool: &DbPool,
    payload: &WorkflowRunEnqueue<'_>,
) -> Result<WorkflowRunDbRecord>
Expand description

Enqueues a workflow run in its own transaction.

Calls without an idempotency key always create a new workflow run. Calls with an idempotency key return the existing run only when the canonical enqueue request snapshot matches. Keyed rows without snapshots are rejected by the idempotency cutover.