Skip to main content

distribute_live_tasks

Function distribute_live_tasks 

Source
pub fn distribute_live_tasks(
    feed: Receiver<LiveTarget>,
    measurement: Arc<RwLock<Option<MeasurementState>>>,
    workers: Arc<Mutex<Vec<WorkerSender<Result<Instruction, Status>>>>>,
    m_def: &ScheduleMeasurement,
    m_id: u32,
)
Expand description

Live task distributor for feed-based measurements.

Prioritizes follow-up tasks for workers (–responsive). Drains targets up to the probing rate (optinally enforced by the orchestrator).

Measurement probes are optionally repeated by the worker (nprobes > 1).

In feed-trace mode (is_trace), targets are probed with TTL-limited trace probes (per-target ttl, default 255)

The measurement ends when the feed has closed (the CLI ended its stream or disconnected) and all follow-ups and pending discoveries have resolved, or when no probing workers remain.