Revert implementation of get_status to query only the database

This commit is contained in:
Loïc Lecrenier 2022-10-24 15:12:01 +02:00 committed by Clément Renault
parent 424202d773
commit e9cd6cbbee
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -114,19 +114,7 @@ impl IndexScheduler {
}
pub(crate) fn get_status(&self, rtxn: &RoTxn, status: Status) -> Result<RoaringBitmap> {
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(