mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-06 12:46:31 +00:00
Use Hannoy instead of arroy
This commit is contained in:
committed by
Louis Dureuil
parent
580bfb06b4
commit
affcaef556
@ -98,12 +98,12 @@ impl Progress {
|
||||
}
|
||||
|
||||
// TODO: ideally we should expose the progress in a way that let arroy use it directly
|
||||
pub(crate) fn update_progress_from_arroy(&self, progress: arroy::WriterProgress) {
|
||||
self.update_progress(progress.main);
|
||||
if let Some(sub) = progress.sub {
|
||||
self.update_progress(sub);
|
||||
}
|
||||
}
|
||||
// pub(crate) fn update_progress_from_hannoy(&self, progress: hannoy::WriterProgress) {
|
||||
// self.update_progress(progress.main);
|
||||
// if let Some(sub) = progress.sub {
|
||||
// self.update_progress(sub);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/// Generate the names associated with the durations and push them.
|
||||
@ -277,43 +277,43 @@ impl<U: Send + Sync + 'static> Step for VariableNameStep<U> {
|
||||
}
|
||||
}
|
||||
|
||||
impl Step for arroy::MainStep {
|
||||
fn name(&self) -> Cow<'static, str> {
|
||||
match self {
|
||||
arroy::MainStep::PreProcessingTheItems => "pre processing the items",
|
||||
arroy::MainStep::WritingTheDescendantsAndMetadata => {
|
||||
"writing the descendants and metadata"
|
||||
}
|
||||
arroy::MainStep::RetrieveTheUpdatedItems => "retrieve the updated items",
|
||||
arroy::MainStep::RetrievingTheTreeAndItemNodes => "retrieving the tree and item nodes",
|
||||
arroy::MainStep::UpdatingTheTrees => "updating the trees",
|
||||
arroy::MainStep::CreateNewTrees => "create new trees",
|
||||
arroy::MainStep::WritingNodesToDatabase => "writing nodes to database",
|
||||
arroy::MainStep::DeleteExtraneousTrees => "delete extraneous trees",
|
||||
arroy::MainStep::WriteTheMetadata => "write the metadata",
|
||||
}
|
||||
.into()
|
||||
}
|
||||
// impl Step for hannoy::MainStep {
|
||||
// fn name(&self) -> Cow<'static, str> {
|
||||
// match self {
|
||||
// hannoy::MainStep::PreProcessingTheItems => "pre processing the items",
|
||||
// hannoy::MainStep::WritingTheDescendantsAndMetadata => {
|
||||
// "writing the descendants and metadata"
|
||||
// }
|
||||
// hannoy::MainStep::RetrieveTheUpdatedItems => "retrieve the updated items",
|
||||
// hannoy::MainStep::RetrievingTheTreeAndItemNodes => "retrieving the tree and item nodes",
|
||||
// hannoy::MainStep::UpdatingTheTrees => "updating the trees",
|
||||
// hannoy::MainStep::CreateNewTrees => "create new trees",
|
||||
// hannoy::MainStep::WritingNodesToDatabase => "writing nodes to database",
|
||||
// hannoy::MainStep::DeleteExtraneousTrees => "delete extraneous trees",
|
||||
// hannoy::MainStep::WriteTheMetadata => "write the metadata",
|
||||
// }
|
||||
// .into()
|
||||
// }
|
||||
|
||||
fn current(&self) -> u32 {
|
||||
*self as u32
|
||||
}
|
||||
// fn current(&self) -> u32 {
|
||||
// *self as u32
|
||||
// }
|
||||
|
||||
fn total(&self) -> u32 {
|
||||
Self::CARDINALITY as u32
|
||||
}
|
||||
}
|
||||
// fn total(&self) -> u32 {
|
||||
// Self::CARDINALITY as u32
|
||||
// }
|
||||
// }
|
||||
|
||||
impl Step for arroy::SubStep {
|
||||
fn name(&self) -> Cow<'static, str> {
|
||||
self.unit.into()
|
||||
}
|
||||
// impl Step for hannoy::SubStep {
|
||||
// fn name(&self) -> Cow<'static, str> {
|
||||
// self.unit.into()
|
||||
// }
|
||||
|
||||
fn current(&self) -> u32 {
|
||||
self.current.load(Ordering::Relaxed)
|
||||
}
|
||||
// fn current(&self) -> u32 {
|
||||
// self.current.load(Ordering::Relaxed)
|
||||
// }
|
||||
|
||||
fn total(&self) -> u32 {
|
||||
self.max
|
||||
}
|
||||
}
|
||||
// fn total(&self) -> u32 {
|
||||
// self.max
|
||||
// }
|
||||
// }
|
||||
|
Reference in New Issue
Block a user