fix: flush more liberally

This commit is contained in:
xeruf 2024-11-22 11:21:04 +01:00
parent 1a7b65fe1c
commit 29476e60ad
2 changed files with 4 additions and 4 deletions

View File

@ -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| {

View File

@ -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();