diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 0bfec9eed..07d896d7b 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -293,8 +293,8 @@ impl IndexScheduler { /// Returns the tasks corresponding to the query. pub fn get_tasks(&self, query: Query) -> Result> { - let rtxn = self.env.read_txn()?; let tasks = self.get_task_ids(&query)?; + let rtxn = self.env.read_txn()?; let tasks = self.get_existing_tasks( &rtxn,