Skip to main content

refresh_if_stale

Function refresh_if_stale 

Source
pub(crate) async fn refresh_if_stale(
    client: &Client,
    local_url: &str,
    auth_key: &str,
)
Expand description

Fetch the keys if there is no copy yet, or it is older than five minutes (a key replaced while this process ran is picked up then; srv serves the same one until it is replaced). Errors leave the old copy (or none) in place: signing then falls back to the env keys, exactly as before M4d-3.