mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-12 14:27:28 +01:00
make the progress use payload instead of documents
This commit is contained in:
parent
85577e70cd
commit
f1beb60204
@ -138,6 +138,7 @@ macro_rules! make_atomic_progress {
|
|||||||
}
|
}
|
||||||
|
|
||||||
make_atomic_progress!(Document alias AtomicDocumentStep => "document" );
|
make_atomic_progress!(Document alias AtomicDocumentStep => "document" );
|
||||||
|
make_atomic_progress!(Payload alias AtomicPayloadStep => "payload" );
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Clone)]
|
#[derive(Debug, Serialize, Clone)]
|
||||||
pub struct ProgressView {
|
pub struct ProgressView {
|
||||||
|
@ -15,7 +15,7 @@ use super::super::document_change::DocumentChange;
|
|||||||
use super::document_changes::{DocumentChangeContext, DocumentChanges};
|
use super::document_changes::{DocumentChangeContext, DocumentChanges};
|
||||||
use super::retrieve_or_guess_primary_key;
|
use super::retrieve_or_guess_primary_key;
|
||||||
use crate::documents::PrimaryKey;
|
use crate::documents::PrimaryKey;
|
||||||
use crate::progress::{AtomicDocumentStep, Progress};
|
use crate::progress::{AtomicDocumentStep, AtomicPayloadStep, Progress};
|
||||||
use crate::update::new::document::Versions;
|
use crate::update::new::document::Versions;
|
||||||
use crate::update::new::steps::IndexingStep;
|
use crate::update::new::steps::IndexingStep;
|
||||||
use crate::update::new::thread_local::MostlySend;
|
use crate::update::new::thread_local::MostlySend;
|
||||||
@ -71,7 +71,7 @@ impl<'pl> DocumentOperation<'pl> {
|
|||||||
let mut primary_key = None;
|
let mut primary_key = None;
|
||||||
|
|
||||||
let payload_count = operations.len();
|
let payload_count = operations.len();
|
||||||
let (step, progress_step) = AtomicDocumentStep::new(payload_count as u32);
|
let (step, progress_step) = AtomicPayloadStep::new(payload_count as u32);
|
||||||
progress.update_progress(progress_step);
|
progress.update_progress(progress_step);
|
||||||
|
|
||||||
for (payload_index, operation) in operations.into_iter().enumerate() {
|
for (payload_index, operation) in operations.into_iter().enumerate() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user