From e9cd6cbbeefaef6a2d48e9c205aec97be0b7f7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Mon, 24 Oct 2022 15:12:01 +0200 Subject: [PATCH] Revert implementation of `get_status` to query only the database --- index-scheduler/src/utils.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/index-scheduler/src/utils.rs b/index-scheduler/src/utils.rs index e14da4d53..ca46e7ae6 100644 --- a/index-scheduler/src/utils.rs +++ b/index-scheduler/src/utils.rs @@ -114,19 +114,7 @@ impl IndexScheduler { } pub(crate) fn get_status(&self, rtxn: &RoTxn, status: Status) -> Result { - match status { - Status::Processing => { - let tasks = self - .processing_tasks - .read() - .map_err(|_| Error::CorruptedTaskQueue)? - .processing - .clone(); - - Ok(tasks) - } - status => Ok(self.status.get(rtxn, &status)?.unwrap_or_default()), - } + Ok(self.status.get(rtxn, &status)?.unwrap_or_default()) } pub(crate) fn put_status(