Avoid creating two read txn at the same time

This commit is contained in:
Loïc Lecrenier 2022-10-13 13:04:49 +02:00 committed by Clément Renault
parent 8c6aeaada5
commit 441417447e
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -293,8 +293,8 @@ impl IndexScheduler {
/// Returns the tasks corresponding to the query.
pub fn get_tasks(&self, query: Query) -> Result<Vec<Task>> {
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,