mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-29 16:24:26 +01:00
Clean up the delete_persisted_task_data function
This commit is contained in:
parent
d21651c968
commit
6460b78e08
@ -699,21 +699,9 @@ impl IndexScheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn delete_persisted_task_data(&self, task: &Task) -> Result<()> {
|
pub(crate) fn delete_persisted_task_data(&self, task: &Task) -> Result<()> {
|
||||||
match &task.kind {
|
match task.content_uuid() {
|
||||||
KindWithContent::DocumentImport { content_file, .. } => {
|
Some(content_file) => self.delete_update_file(*content_file),
|
||||||
self.delete_update_file(*content_file)
|
None => Ok(()),
|
||||||
}
|
|
||||||
KindWithContent::DocumentDeletion { .. }
|
|
||||||
| KindWithContent::DocumentClear { .. }
|
|
||||||
| KindWithContent::Settings { .. }
|
|
||||||
| KindWithContent::IndexDeletion { .. }
|
|
||||||
| KindWithContent::IndexCreation { .. }
|
|
||||||
| KindWithContent::IndexUpdate { .. }
|
|
||||||
| KindWithContent::IndexSwap { .. }
|
|
||||||
| KindWithContent::TaskCancelation { .. }
|
|
||||||
| KindWithContent::TaskDeletion { .. }
|
|
||||||
| KindWithContent::DumpExport { .. }
|
|
||||||
| KindWithContent::Snapshot => Ok(()),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user