/// The method processes timed-out artifacts.
///
/// This method is called by the method on_timer(). It checks if there are
/// any timed-out artifacts in the under-construction list and removes
/// them from.
The method processes timed-out artifacts.
This method is called by the method on_timer(). It checks if there are
any timed-out artifacts in the under-construction list and removes
them from.
The method processes timed - out artifacts . This method is called by the method on_timer () . It checks if there are any timed - out artifacts in the under - construction list and removes them from .
fn process_timed_out_artifacts(&self) {
        // Prune the expired downloads from the under-construction list.
        let expired_downloads = self
            .artifacts_under_construction
            .write()
            .unwrap()
            .deref_mut()
            .prune_expired_downloads();
        self.metrics
            .artifact_timeouts
            .inc_by(expired_downloads.len() as u64);
        // Add the timed-out adverts to the end of their respective
        // priority queue in the prioritizer.
        expired_downloads
            .into_iter()
            .for_each(|(artifact_id, integrity_hash)| {
                let _ = self
                    .prioritizer
                    .reinsert_advert_at_tail(&artifact_id, &integrity_hash);
            });
    }
fn process_timed_out_artifacts ( & self ) { // Prune the expired downloads from the under-construction list. let expired_downloads = self . artifacts_under_construction . write ( ) . unwrap ( ) . deref_mut ( ) . prune_expired_downloads ( ) ; self . metrics . artifact_timeouts . inc_by ( expired_downloads . len ( ) as u64 ) ; // Add the timed-out adverts to the end of their respective // priority queue in the prioritizer. expired_downloads . into_iter ( ) . for_each ( | ( artifact_id , integrity_hash ) | { let _ = self . prioritizer . reinsert_advert_at_tail ( & artifact_id , & integrity_hash ) ; } ) ; }
The method processes timed-out artifacts.
The method processes timed - out artifacts .
&self