Skip to main content

drain_queue_expected

Function drain_queue_expected 

Source
pub async fn drain_queue_expected<R, Fut>(
    repo_root: &Path,
    once: bool,
    expected: Option<&str>,
    run_mission: R,
) -> Result<DrainReport>
where R: Fn(String) -> Fut, Fut: Future<Output = Result<i32>>,
Expand description

Drain with an optional atomic front-entry expectation. When expected is set and a sibling dispatcher changed the front before the claim landed, the claimed entry is released and returned in DrainReport::expected_mismatch without running it. This is the supervised-adapter guard for producers that must translate one specific queued mission’s outcome back to an external system.