From 972bb2831cfae6546d00638ea1cc65e88a873174 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 25 Apr 2023 13:11:58 +0200 Subject: [PATCH] log when meilisearch need to delete tasks --- index-scheduler/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 524c8f32b..05cfc05b5 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -1115,10 +1115,16 @@ impl IndexScheduler { // /!\ the len must be at least 2 or else we might enter an infinite loop where we only delete // the deletion tasks we enqueued ourselves. if to_delete.len() < 2 { + log::warn!("The task queue is almost full, but no task can be deleted yet."); // the only thing we can do is hope that the user tasks are going to finish return Ok(()); } + log::info!( + "The task queue is almost full. Thus, meilisearch will delete the last {} finished tasks.", + to_delete.len() + ); + self.register(KindWithContent::TaskDeletion { query: format!( "?from={},limit={},status=succeeded,failed,canceled",