Skip to main content

last_github_contact

Function last_github_contact 

Source
pub fn last_github_contact(
    paths: &AppPaths,
) -> Result<Option<DateTime<Utc>>, ServiceError>
Expand description

Reads the last successful GitHub contact, or reports that none was recorded.

Ok(None) is the honest answer on a host whose agent has never run, and it is what service status prints rather than a zero timestamp.

§Errors

ServiceError::Record when the file exists and cannot be read or parsed. A malformed heartbeat is reported rather than treated as absence: absence means “the agent has never reached GitHub”, and reporting a parse failure as that would be a wrong answer to the question Journey 5 asks.