Skip to content

Commit

Permalink
feat: [torrust#420] ignore torrent not found when importing statistic…
Browse files Browse the repository at this point in the history
…s from tracker
  • Loading branch information
josecelano committed Jan 3, 2024
1 parent f975bf5 commit ff90e9e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/tracker/statistics_importer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ impl StatisticsImporter {
let ret = self.import_torrent_statistics(torrent.torrent_id, &torrent.info_hash).await;

if let Some(err) = ret.err() {
let message = format!(
"Error updating torrent tracker stats for torrent with id {}: {:?}",
torrent.torrent_id, err
);
error!(target: "statistics_importer", "{}", message);
if err != TrackerAPIError::TorrentNotFound {
let message = format!(
"Error updating torrent tracker stats for torrent. Torrent: id {}; infohash {}. Error: {:?}",
torrent.torrent_id, torrent.info_hash, err
);
error!(target: "statistics_importer", "{}", message);
}
}
}

Expand Down

0 comments on commit ff90e9e

Please sign in to comment.