mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
Fix number of deleted tasks details after duplicate task deletion
This commit is contained in:
parent
d49d7e9c2d
commit
7ce336306d
4 changed files with 20 additions and 21 deletions
|
@ -8,6 +8,18 @@ use crate::{Error, IndexScheduler, Result, Task, TaskId};
|
|||
use meilisearch_types::tasks::{Kind, Status};
|
||||
|
||||
impl IndexScheduler {
|
||||
pub(crate) fn all_task_ids(&self, rtxn: &RoTxn) -> Result<RoaringBitmap> {
|
||||
let mut all_tasks = RoaringBitmap::new();
|
||||
for status in [
|
||||
Status::Enqueued,
|
||||
Status::Processing,
|
||||
Status::Succeeded,
|
||||
Status::Failed,
|
||||
] {
|
||||
all_tasks |= self.get_status(&rtxn, status)?;
|
||||
}
|
||||
Ok(all_tasks)
|
||||
}
|
||||
pub(crate) fn last_task_id(&self, rtxn: &RoTxn) -> Result<Option<TaskId>> {
|
||||
Ok(self
|
||||
.all_tasks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue