async fn tick_check_updates(&self, state: &mut UpdateAgentState) {
        trace!("trying to check for udpates");

        let timestamp_now = chrono::Utc::now();
        utils::update_unit_status(&format!(
            "periodically polling for updates (last checked {})",
            timestamp_now.format("%a %Y-%m-%d %H:%M:%S %Z")
        ));
        let allow_downgrade = self.allow_downgrade;

        let release = self
            .cincinnati
            .fetch_update_hint(&self.identity, state.denylist.clone(), allow_downgrade)
            .await;

        match release {
            Some(release) => {
                utils::update_unit_status(&format!("found update on remote: {}", release.version));
                state.machine_state.update_available(release);
            }
            None => {
                state.machine_state.no_new_update();
            }
        }
    }
/// Try to check for updates.
Try to check for updates.
Try to check for updates .
async fn tick_check_updates(&self, state: &mut UpdateAgentState) {
        trace!("trying to check for udpates");
        let timestamp_now = chrono::Utc::now();
        utils::update_unit_status(&format!(
            "periodically polling for updates (last checked {})",
            timestamp_now.format("%a %Y-%m-%d %H:%M:%S %Z")
        ));
        let allow_downgrade = self.allow_downgrade;
        let release = self
            .cincinnati
            .fetch_update_hint(&self.identity, state.denylist.clone(), allow_downgrade)
            .await;
        match release {
            Some(release) => {
                utils::update_unit_status(&format!("found update on remote: {}", release.version));
                state.machine_state.update_available(release);
            }
            None => {
                state.machine_state.no_new_update();
            }
        }
    }
async fn tick_check_updates ( & self , state : & mut UpdateAgentState ) { trace ! ( " " ) ; let timestamp_now = chrono :: Utc :: now ( ) ; utils :: update_unit_status ( & format ! ( " " timestamp_now format ( " " ) ) ) ; let allow_downgrade = self . allow_downgrade ; let release = self . cincinnati . fetch_update_hint ( & self . identity , state . denylist . clone ( ) , allow_downgrade ) . await ; match release { Some ( release ) => { utils :: update_unit_status ( & format ! ( " " release version ) ) ; state . machine_state . update_available ( release ) ; } None => { state . machine_state . no_new_update ( ) ; } } }
Try to check for updates.
Try to check for updates .
&self
state
&mut UpdateAgentState