add the task to the index db in the register task

This commit is contained in:
Tamo 2022-09-07 00:22:58 +02:00 committed by Clément Renault
parent ed745591e1
commit 705af94fd7
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
3 changed files with 84 additions and 33 deletions

View file

@ -110,6 +110,15 @@ impl IndexScheduler {
self.all_tasks
.append(&mut wtxn, &BEU32::new(task_id), &task)?;
if let Some(indexes) = task.indexes() {
for index in indexes {
self.update_index(&mut wtxn, index, |mut bitmap| {
bitmap.insert(task_id);
bitmap
})?;
}
}
self.update_status(&mut wtxn, Status::Enqueued, |mut bitmap| {
bitmap.insert(task_id);
bitmap