create dump v5

This commit is contained in:
ad hoc 2022-05-23 10:54:49 +02:00
parent 4778884105
commit 61035a3ea4
No known key found for this signature in database
GPG key ID: 4F00A782990CC643
4 changed files with 27 additions and 18 deletions

View file

@ -24,7 +24,7 @@ enum TaskType {
DocumentDeletion,
SettingsUpdate,
ClearAll,
Dump,
DumpCreation,
}
impl From<TaskContent> for TaskType {
@ -44,7 +44,7 @@ impl From<TaskContent> for TaskType {
TaskContent::IndexDeletion => TaskType::IndexDeletion,
TaskContent::IndexCreation { .. } => TaskType::IndexCreation,
TaskContent::IndexUpdate { .. } => TaskType::IndexUpdate,
TaskContent::Dump { .. } => TaskType::Dump,
TaskContent::Dump { .. } => TaskType::DumpCreation,
_ => unreachable!("unexpected task type"),
}
}
@ -220,9 +220,10 @@ impl From<Task> for TaskView {
TaskType::IndexUpdate,
Some(TaskDetails::IndexInfo { primary_key }),
),
TaskContent::Dump { uid } => {
(TaskType::Dump, Some(TaskDetails::Dump { dump_uid: uid }))
}
TaskContent::Dump { uid } => (
TaskType::DumpCreation,
Some(TaskDetails::Dump { dump_uid: uid }),
),
};
// An event always has at least one event: "Created"