make the progress use payload instead of documents

This commit is contained in:
Tamo 2024-12-11 18:07:45 +01:00
parent 85577e70cd
commit f1beb60204
No known key found for this signature in database
GPG Key ID: 20CD8020AFA88D69
2 changed files with 3 additions and 2 deletions

View File

@ -138,6 +138,7 @@ macro_rules! make_atomic_progress {
}
make_atomic_progress!(Document alias AtomicDocumentStep => "document" );
make_atomic_progress!(Payload alias AtomicPayloadStep => "payload" );
#[derive(Debug, Serialize, Clone)]
pub struct ProgressView {

View File

@ -15,7 +15,7 @@ use super::super::document_change::DocumentChange;
use super::document_changes::{DocumentChangeContext, DocumentChanges};
use super::retrieve_or_guess_primary_key;
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::steps::IndexingStep;
use crate::update::new::thread_local::MostlySend;
@ -71,7 +71,7 @@ impl<'pl> DocumentOperation<'pl> {
let mut primary_key = None;
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);
for (payload_index, operation) in operations.into_iter().enumerate() {