fix update loop infinite loop

This commit is contained in:
marin postma
2021-06-02 15:20:32 +02:00
parent 509a56a43d
commit 75c0718691
2 changed files with 7 additions and 5 deletions

View File

@ -303,9 +303,13 @@ impl UpdateStore {
}
None => None,
};
// Process the pending update using the provided user function.
let result = Handle::current()
.block_on(index_handle.update(index_uuid, processing, file))?;
let handle = Handle::current();
let result = match handle.block_on(index_handle.update(index_uuid, processing.clone(), file)) {
Ok(result) => result,
Err(e) => Err(processing.fail(e.to_string())),
};
// Once the pending update have been successfully processed
// we must remove the content from the pending and processing stores and