pub async fn follow(
queue: &Queue,
home: &Path,
id: &str,
poll: Duration,
max_wait: Option<Duration>,
seen: impl FnMut(&str),
progress: impl FnMut(&str),
) -> Result<Followed>Expand description
Watch id until the loop that owns it is done with it, calling seen with
each run id the first time it appears on the task, and progress with a
line whenever the newest run’s status changes.
Finished is done, held or blocked: a failed or queued task is the
loop’s to retry. A task that stays unfinished while no loop is alive, or
past max_wait, is an error - never taken over here, because the loop may
merely be slow to heartbeat and a second driver would race it. Recovery is
the loop’s own claim reclaim and Runner::resume. Running out of
max_wait is not an error: it returns with finished: false.