mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
Make it compile
This commit is contained in:
parent
87547550f5
commit
f3ab940776
6 changed files with 36 additions and 27 deletions
|
@ -21,6 +21,8 @@ pub struct BatchView {
|
|||
pub started_at: OffsetDateTime,
|
||||
#[serde(with = "time::serde::rfc3339::option", default)]
|
||||
pub finished_at: Option<OffsetDateTime>,
|
||||
#[serde(default = "meilisearch_types::batches::default_stop_reason")]
|
||||
pub stop_reason: String,
|
||||
}
|
||||
|
||||
impl BatchView {
|
||||
|
@ -33,6 +35,7 @@ impl BatchView {
|
|||
duration: batch.finished_at.map(|finished_at| finished_at - batch.started_at),
|
||||
started_at: batch.started_at,
|
||||
finished_at: batch.finished_at,
|
||||
stop_reason: batch.stop_reason.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ pub struct Batch {
|
|||
pub stop_reason: String,
|
||||
}
|
||||
|
||||
fn default_stop_reason() -> String {
|
||||
pub fn default_stop_reason() -> String {
|
||||
BatchStopReason::default().to_string()
|
||||
}
|
||||
|
||||
|
|
|
@ -691,8 +691,8 @@ pub enum BatchStopReason {
|
|||
task_limit: usize,
|
||||
},
|
||||
ReachedSizeLimit {
|
||||
size_limit: usize,
|
||||
size: usize,
|
||||
size_limit: u64,
|
||||
size: u64,
|
||||
},
|
||||
PrimaryKeyIndexMismatch {
|
||||
id: TaskId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue