mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
handle dump
This commit is contained in:
parent
56eb2907c9
commit
57fde30b91
9 changed files with 94 additions and 136 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue