connect the new scheduler to meilisearch-http officially.

I can index documents and do search
This commit is contained in:
Tamo 2022-09-26 13:46:34 +02:00 committed by Clément Renault
parent cb4feabca2
commit ce2dfecc03
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
4 changed files with 38 additions and 13 deletions

View file

@ -49,6 +49,12 @@ impl IndexScheduler {
.get_task(wtxn, task.uid)?
.ok_or(Error::CorruptedTaskQueue)?;
debug_assert_eq!(old_task.uid, task.uid);
if old_task == *task {
return Ok(());
}
if old_task.status != task.status {
self.update_status(wtxn, old_task.status, |bitmap| {
bitmap.remove(task.uid);
@ -67,8 +73,7 @@ impl IndexScheduler {
})?;
}
// TODO: TAMO: update the task in `all_tasks`
self.all_tasks.put(wtxn, &BEU32::new(task.uid), &task)?;
Ok(())
}