Skip to main content

completion_task_id

Function completion_task_id 

Source
pub fn completion_task_id(row: &IntentRow) -> Option<String>
Expand description

The session whose completion intent one queue row carries, when the row is one.

Two shapes and no others, and the restriction is a soundness rule rather than tidiness. A receipt closes the drain the completion is riding on, and the reducer only admits one from a drain that is open — so feeding a receipt for an accepted op that merely names a task would close the completion’s drain on the strength of something else entirely. An ack settles a delivery, a ready or heartbeat report publishes a projection, and a note wakes an agent: none of them is the completion, and none of them may end it. The two that are, are the Completion envelope the settlement sends and the complete report the residual reconcile sends when it holds no envelope.

The session is keyed by the task the intent answers, which is what a client-held session’s own row is keyed by. A row whose payload names no task — a note, or an ack — answers None, and the caller leaves the reducer alone rather than guessing a session.