diff --git a/src/event_sender.rs b/src/event_sender.rs index 11a5200..727d9e4 100644 --- a/src/event_sender.rs +++ b/src/event_sender.rs @@ -65,7 +65,7 @@ impl EventSender { })?) } /// Sends all pending events - fn force_flush(&self) { + pub(crate) fn force_flush(&self) { debug!("Flushing {} events from queue", self.queue.borrow().len()); let values = self.clear(); self.url.as_ref().map(|url| { diff --git a/src/tasks.rs b/src/tasks.rs index 3ea255a..7c1f9a7 100644 --- a/src/tasks.rs +++ b/src/tasks.rs @@ -855,7 +855,7 @@ impl TasksRelay { } pub(crate) fn flush(&self) { - self.sender.flush(); + self.sender.force_flush(); } /// Returns ids of tasks matching the given string. @@ -955,7 +955,7 @@ impl TasksRelay { let pos = self.get_position(); if target == pos { debug!("Flushing Tasks because of move in place"); - self.flush(); + self.sender.flush(); return; } @@ -964,7 +964,7 @@ impl TasksRelay { .is_some_and(|t| t.parent_id() == pos.as_ref()) { debug!("Flushing Tasks because of move beyond child"); - self.flush(); + self.sender.flush(); } let now = Timestamp::now();