From d70284150dc3fd02b29d1903f6474587e410e252 Mon Sep 17 00:00:00 2001 From: quambene Date: Wed, 20 Mar 2024 02:02:20 +0100 Subject: [PATCH] Fix report (#86) --- CHANGELOG.md | 1 + src/bookmarks/bookmark_service.rs | 1 + src/bookmarks/mod.rs | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 179df42..cbc05e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - changed - Fix removing ignored urls - Fix removed bookmarks in dry run + - Fix processing report for underlyings - Update dependencies - removed diff --git a/src/bookmarks/bookmark_service.rs b/src/bookmarks/bookmark_service.rs index 8f48d73..454300a 100644 --- a/src/bookmarks/bookmark_service.rs +++ b/src/bookmarks/bookmark_service.rs @@ -231,6 +231,7 @@ where { let mut report = self.report.lock(); + report.reset(); report.set_total(bookmarks.len()); } diff --git a/src/bookmarks/mod.rs b/src/bookmarks/mod.rs index 6233ba2..fcd786e 100644 --- a/src/bookmarks/mod.rs +++ b/src/bookmarks/mod.rs @@ -424,6 +424,15 @@ impl ServiceReport { } } + pub fn reset(&mut self) { + self.total = 0; + self.processed = 0; + self.cached = 0; + self.failed_response = 0; + self.binary_response = 0; + self.empty_response = 0; + } + pub fn set_total(&mut self, total: usize) { self.total = total; }