mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 14:54:27 +01:00
Revert implementation of get_status
to query only the database
This commit is contained in:
parent
424202d773
commit
e9cd6cbbee
@ -114,19 +114,7 @@ impl IndexScheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn get_status(&self, rtxn: &RoTxn, status: Status) -> Result<RoaringBitmap> {
|
pub(crate) fn get_status(&self, rtxn: &RoTxn, status: Status) -> Result<RoaringBitmap> {
|
||||||
match status {
|
Ok(self.status.get(rtxn, &status)?.unwrap_or_default())
|
||||||
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()),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn put_status(
|
pub(crate) fn put_status(
|
||||||
|
Loading…
Reference in New Issue
Block a user