mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-11-04 01:46:28 +00:00 
			
		
		
		
	rename documents -> substep
This commit is contained in:
		@@ -253,11 +253,7 @@ where
 | 
			
		||||
            }
 | 
			
		||||
            let finished_documents = (finished_documents * CHUNK_SIZE) as u32;
 | 
			
		||||
 | 
			
		||||
            (send_progress)(Progress::from_step_documents(
 | 
			
		||||
                step,
 | 
			
		||||
                finished_documents,
 | 
			
		||||
                total_documents,
 | 
			
		||||
            ));
 | 
			
		||||
            (send_progress)(Progress::from_step_substep(step, finished_documents, total_documents));
 | 
			
		||||
 | 
			
		||||
            // Clean up and reuse the document-specific allocator
 | 
			
		||||
            context.doc_alloc.reset();
 | 
			
		||||
@@ -276,7 +272,7 @@ where
 | 
			
		||||
        },
 | 
			
		||||
    )?;
 | 
			
		||||
 | 
			
		||||
    (send_progress)(Progress::from_step_documents(step, total_documents, total_documents));
 | 
			
		||||
    (send_progress)(Progress::from_step_substep(step, total_documents, total_documents));
 | 
			
		||||
 | 
			
		||||
    Ok(())
 | 
			
		||||
}
 | 
			
		||||
@@ -285,7 +281,7 @@ pub struct Progress {
 | 
			
		||||
    pub finished_steps: u16,
 | 
			
		||||
    pub total_steps: u16,
 | 
			
		||||
    pub step_name: &'static str,
 | 
			
		||||
    pub finished_total_documents: Option<(u32, u32)>,
 | 
			
		||||
    pub finished_total_substep: Option<(u32, u32)>,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl Progress {
 | 
			
		||||
@@ -294,12 +290,12 @@ impl Progress {
 | 
			
		||||
            finished_steps: step.finished_steps(),
 | 
			
		||||
            total_steps: Step::total_steps(),
 | 
			
		||||
            step_name: step.name(),
 | 
			
		||||
            finished_total_documents: None,
 | 
			
		||||
            finished_total_substep: None,
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    pub fn from_step_documents(step: Step, finished_documents: u32, total_documents: u32) -> Self {
 | 
			
		||||
    pub fn from_step_substep(step: Step, finished_substep: u32, total_substep: u32) -> Self {
 | 
			
		||||
        Self {
 | 
			
		||||
            finished_total_documents: Some((finished_documents, total_documents)),
 | 
			
		||||
            finished_total_substep: Some((finished_substep, total_substep)),
 | 
			
		||||
            ..Progress::from_step(step)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -71,7 +71,7 @@ impl<'pl> DocumentOperation<'pl> {
 | 
			
		||||
            if must_stop_processing() {
 | 
			
		||||
                return Err(InternalError::AbortedIndexation.into());
 | 
			
		||||
            }
 | 
			
		||||
            send_progress(Progress::from_step_documents(
 | 
			
		||||
            send_progress(Progress::from_step_substep(
 | 
			
		||||
                Step::PreparingPayloads,
 | 
			
		||||
                payload_index as u32,
 | 
			
		||||
                payload_count as u32,
 | 
			
		||||
@@ -117,7 +117,7 @@ impl<'pl> DocumentOperation<'pl> {
 | 
			
		||||
            operations_stats.push(PayloadStats { document_count, bytes, error });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        send_progress(Progress::from_step_documents(
 | 
			
		||||
        send_progress(Progress::from_step_substep(
 | 
			
		||||
            Step::PreparingPayloads,
 | 
			
		||||
            payload_count as u32,
 | 
			
		||||
            payload_count as u32,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user