handle dump

This commit is contained in:
ad hoc 2022-05-19 20:18:43 +02:00
parent 56eb2907c9
commit 57fde30b91
No known key found for this signature in database
GPG key ID: 4F00A782990CC643
9 changed files with 94 additions and 136 deletions

View file

@ -82,6 +82,8 @@ enum TaskDetails {
},
#[serde(rename_all = "camelCase")]
ClearAll { deleted_documents: Option<u64> },
#[serde(rename_all = "camelCase")]
Dump { dump_uid: String },
}
/// Serialize a `time::Duration` as a best effort ISO 8601 while waiting for
@ -218,7 +220,9 @@ impl From<Task> for TaskView {
TaskType::IndexUpdate,
Some(TaskDetails::IndexInfo { primary_key }),
),
TaskContent::Dump => (TaskType::Dump, None),
TaskContent::Dump { uid } => {
(TaskType::Dump, Some(TaskDetails::Dump { dump_uid: uid }))
}
};
// An event always has at least one event: "Created"