Skip to main content

staleness

Function staleness 

Source
pub fn staleness(
    last_committed: Option<&str>,
    threshold_days: i64,
    reference_epoch_secs: i64,
) -> Staleness
Expand description

Staleness of one last-committed date against threshold_days, evaluated at reference_epoch_secs (Unix seconds, UTC). An unknown / unparseable date yields the all-None result.

reference_epoch_secs stands in for the oracle’s reference datetime (datetime.now(UTC) in production; injectable for determinism). Passing it as an epoch keeps this function clock-free and portable.