Throw the error if we can't register the tasks in the store
@@ -438,12 +438,9 @@ impl IndexScheduler {
(bitmap.insert(task.uid));
})?;
- match wtxn.commit() {
- Ok(()) => (),
- _e @ Err(_) => {
+ if let Err(e) = wtxn.commit() {
self.delete_persisted_task_data(&task)?;
- // _e?;
- }
+ return Err(e.into());
}
// If the registered task is a task cancelation
