Skip to main content

complete_external

Function complete_external 

Source
pub async fn complete_external<'e, E>(
    executor: E,
    callback_id: Uuid,
    _payload: Option<Value>,
) -> Result<JobRow, AwaError>
where E: PgExecutor<'e>,
Expand description

Complete a waiting job via external callback.

Accepts jobs in waiting_external or running state (race handling: the external system may fire before the executor transitions to waiting_external).

The payload parameter is accepted but not stored on the job — it exists for callers who want to pass callback data through and will be used by the planned CEL expression filtering/transforms feature. Callers can process the payload immediately or enqueue a follow-up job with it.