mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
wip integrating the scheduler in meilisearch-http
This commit is contained in:
parent
acc6d3a82b
commit
60ee1f5e64
16 changed files with 251 additions and 192 deletions
|
@ -60,6 +60,14 @@ pub struct Meilisearch {
|
|||
index_scheduler: IndexScheduler,
|
||||
}
|
||||
|
||||
impl std::ops::Deref for Meilisearch {
|
||||
type Target = IndexScheduler;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.index_scheduler
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum DocumentAdditionFormat {
|
||||
Json,
|
||||
|
@ -317,10 +325,6 @@ impl Meilisearch {
|
|||
)
|
||||
}
|
||||
|
||||
pub async fn get_task(&self, id: TaskId) -> Result<TaskView> {
|
||||
Ok(self.index_scheduler.task(id)?)
|
||||
}
|
||||
|
||||
pub async fn list_tasks(&self, filter: index_scheduler::Query) -> Result<Vec<TaskView>> {
|
||||
Ok(self.index_scheduler.get_tasks(filter)?)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue