Skip to main content

reap_expired_into

Function reap_expired_into 

Source
pub fn reap_expired_into(
    queues: &mut HashMap<i32, Vec<TaskProgress>>,
    in_flight: &InFlightSet,
    done_tx: &SyncSender<TaskReport>,
) -> ReapSummary
Expand description

Reaps timed-out in-flight tasks and routes each to its own service’s dispatch queue (a retry) or the done queue (a Fatal). Decoupled from the refetch path so the in-flight set drains even under sustained backpressure (KNOWN_ISSUES D-6); routing by task.service_id rather than the requesting service fixes the latent cross-service requeue bug. Returns a ReapSummary of what it did (re-leases vs dead-letters) for the health log.