makes the updates getters smoother to uses

This commit is contained in:
Tamo 2022-09-07 20:44:33 +02:00 committed by Clément Renault
parent 7879189c6b
commit 72b2e68de4
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
2 changed files with 17 additions and 26 deletions

View file

@ -169,21 +169,16 @@ impl IndexScheduler {
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_index(&mut wtxn, index, |bitmap| drop(bitmap.insert(task_id)))?;
}
}
self.update_status(&mut wtxn, Status::Enqueued, |mut bitmap| {
self.update_status(&mut wtxn, Status::Enqueued, |bitmap| {
bitmap.insert(task_id);
bitmap
})?;
self.update_kind(&mut wtxn, task.kind.as_kind(), |mut bitmap| {
bitmap.insert(task_id);
bitmap
self.update_kind(&mut wtxn, task.kind.as_kind(), |bitmap| {
(bitmap.insert(task_id));
})?;
// we persist the file in last to be sure everything before was applied successfuly