mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
move the autobatcher logic to another file
This commit is contained in:
parent
f638774764
commit
448f44f631
3 changed files with 289 additions and 302 deletions
|
@ -1,3 +1,4 @@
|
|||
mod autobatcher;
|
||||
mod batch;
|
||||
mod document_formats;
|
||||
pub mod error;
|
||||
|
@ -219,7 +220,7 @@ impl IndexScheduler {
|
|||
continue;
|
||||
}
|
||||
};
|
||||
let mut batch = match self.get_next_batch(&wtxn) {
|
||||
let mut batch = match self.create_next_batch(&wtxn) {
|
||||
Ok(batch) => batch,
|
||||
Err(e) => {
|
||||
log::error!("{}", e);
|
||||
|
@ -227,7 +228,7 @@ impl IndexScheduler {
|
|||
}
|
||||
};
|
||||
|
||||
let res = self.process_batch(&mut wtxn, &mut batch);
|
||||
let res = self.process_batch(&mut wtxn, batch);
|
||||
|
||||
// TODO: TAMO: do this later
|
||||
// must delete the file on disk
|
||||
|
@ -245,6 +246,7 @@ impl IndexScheduler {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(truc)]
|
||||
fn process_batch(&self, wtxn: &mut RwTxn, batch: &mut Batch) -> Result<()> {
|
||||
match batch {
|
||||
Batch::One(task) => match &task.kind {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue