mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-11-22 04:36:32 +00:00
Only provide the last batch info
This commit is contained in:
@@ -186,8 +186,8 @@ pub async fn get_metrics(
|
|||||||
&Query { statuses: Some(vec![Status::Succeeded, Status::Failed]), ..Query::default() },
|
&Query { statuses: Some(vec![Status::Succeeded, Status::Failed]), ..Query::default() },
|
||||||
auth_filters,
|
auth_filters,
|
||||||
)?;
|
)?;
|
||||||
// ...and get the last three batches only.
|
// ...and get the last batch only.
|
||||||
for batch in batches.into_iter().take(3) {
|
if let Some(batch) = batches.into_iter().next() {
|
||||||
let batch_uid = batch.uid.to_string();
|
let batch_uid = batch.uid.to_string();
|
||||||
for (step_name, duration_str) in batch.stats.progress_trace {
|
for (step_name, duration_str) in batch.stats.progress_trace {
|
||||||
let Some(duration_str) = duration_str.as_str() else { continue };
|
let Some(duration_str) = duration_str.as_str() else { continue };
|
||||||
|
|||||||
Reference in New Issue
Block a user