From a297f61363373d279dea1f0f116174ca12a2f957 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Mon, 23 Sep 2024 13:59:29 +0200 Subject: [PATCH] feat(tasks): report reprocessing issues --- src/tasks.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tasks.rs b/src/tasks.rs index 65cd1e2..0493e26 100644 --- a/src/tasks.rs +++ b/src/tasks.rs @@ -174,16 +174,18 @@ impl TasksRelay { pub(crate) fn process_overflow(&mut self) { let elements = self.overflow.len(); + let mut issues = 0; for _ in 0..elements { - if let Some(event) = self.overflow.pop_front() { + if let Some(event) = self.overflow.pop_back() { if let Some(event) = self.add_prop(event) { warn!("Unable to sort Event {:?}", event); + issues += 1; //self.overflow.push_back(event); } } } if elements > 0 { - info!("Reprocessed {elements} updates{}", self.sender.url.clone().map(|url| format!(" from {url}")).unwrap_or_default()); + info!("Reprocessed {elements} updates with {issues} issues{}", self.sender.url.clone().map(|url| format!(" from {url}")).unwrap_or_default()); } }