async fn tick_stage_update(&self, state: &mut UpdateAgentState, release: Release) {
        trace!("trying to stage an update");

        let target = release.clone();
        let deploy_outcome = self
            .attempt_deploy(target)
            .and_then(|release| self.confirm_valid_stream(state, release))
            .await;

        if let Err(e) = deploy_outcome {
            log::error!("failed to stage deployment: {}", e);
            let fail_count =
                UpdateAgentInfo::deploy_attempt_failed(&release, &mut state.machine_state);
            let msg = format!(
                "trying to stage {} (failed attempts: {})",
                release.version, fail_count,
            );
            utils::update_unit_status(&msg);
            log::trace!("{}", msg);
        };
    }
/// Try to stage an update.
Try to stage an update.
Try to stage an update .
async fn tick_stage_update(&self, state: &mut UpdateAgentState, release: Release) {
        trace!("trying to stage an update");
        let target = release.clone();
        let deploy_outcome = self
            .attempt_deploy(target)
            .and_then(|release| self.confirm_valid_stream(state, release))
            .await;
        if let Err(e) = deploy_outcome {
            log::error!("failed to stage deployment: {}", e);
            let fail_count =
                UpdateAgentInfo::deploy_attempt_failed(&release, &mut state.machine_state);
            let msg = format!(
                "trying to stage {} (failed attempts: {})",
                release.version, fail_count,
            );
            utils::update_unit_status(&msg);
            log::trace!("{}", msg);
        };
    }
async fn tick_stage_update ( & self , state : & mut UpdateAgentState , release : Release ) { trace ! ( " " ) ; let target = release . clone ( ) ; let deploy_outcome = self . attempt_deploy ( target ) . and_then ( | release | self . confirm_valid_stream ( state , release ) ) . await ; if let Err ( e ) = deploy_outcome { log :: error ! ( " " e ) ; let fail_count = UpdateAgentInfo :: deploy_attempt_failed ( & release , & mut state . machine_state ) ; let msg = format ! ( " " release version fail_count ) ; utils :: update_unit_status ( & msg ) ; log :: trace ! ( " " msg ) ; } ; }
Try to stage an update.
Try to stage an update .
&self
state
&mut UpdateAgentState
release
Release