diff --git a/crates/integration-tests/src/main.rs b/crates/integration-tests/src/main.rs index 6ebf7f6c..023768f3 100644 --- a/crates/integration-tests/src/main.rs +++ b/crates/integration-tests/src/main.rs @@ -1134,6 +1134,9 @@ DeliverySummary { }) .collect(); + println!("***** event_times: {event_times:?}"); + assert!(event_times.len() > 1); + let mut last = None; let mut intervals: Vec<_> = event_times .iter() diff --git a/crates/kumod/src/queue.rs b/crates/kumod/src/queue.rs index 41227a77..92fc56d5 100644 --- a/crates/kumod/src/queue.rs +++ b/crates/kumod/src/queue.rs @@ -738,7 +738,7 @@ impl QueueStructure { // we do not want to wake up for every message insertion, // as that would generally be a waste of effort and bog // down the system without gain. - should_notify: now_due < due, + should_notify: if due.is_none() { true } else { now_due < due }, } } Self::SingletonTimerWheel(q) => { @@ -1888,7 +1888,7 @@ impl QueueManager { #[instrument(skip(q))] async fn maintain_named_queue(q: &QueueHandle) -> anyhow::Result<()> { let mut shutdown = ShutdownSubcription::get(); - let mut next_item_due = Instant::now() + ONE_DAY; + let mut next_item_due = Instant::now(); loop { let sleeping = Instant::now();