Skip to main content

attempt_progress

Function attempt_progress 

Source
pub fn attempt_progress(
    tracker: &HeartbeatTracker,
    workflow_id: &WorkflowId,
    activity_id: &ActivityId,
    attempt: u32,
) -> Result<AttemptProgress, ServerError>
Expand description

The progress note this process holds for (workflow, activity, attempt).

When a within-attempt failover has both a dying owner and its adopter tracked, the entry with the most recent heartbeat wins: it is the one still being fed, and taking the other would report a note the live worker has already superseded. last_heartbeat_at is a monotonic std::time::Instant minted by this process, so comparing entries is meaningful even though the value itself would be meaningless to report.

§Errors

Returns ServerError::LockPoisoned when the tracker state cannot be read. An unreadable tracker is reported, never rendered as “no note” — that would be the exact confusion this module exists to prevent.