mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
write the dump export
This commit is contained in:
parent
7ce336306d
commit
9323f9f1c4
25 changed files with 686 additions and 184 deletions
|
@ -13,7 +13,7 @@ use crate::analytics::Analytics;
|
|||
use crate::extractors::authentication::{policies::*, AuthenticationError, GuardedData};
|
||||
use crate::extractors::sequential_extractor::SeqHandler;
|
||||
|
||||
use super::Pagination;
|
||||
use super::{Pagination, SummarizedTaskView};
|
||||
|
||||
pub mod documents;
|
||||
pub mod search;
|
||||
|
@ -108,7 +108,10 @@ pub async fn create_index(
|
|||
index_uid: uid,
|
||||
primary_key,
|
||||
};
|
||||
let task = tokio::task::spawn_blocking(move || index_scheduler.register(task)).await??;
|
||||
let task: SummarizedTaskView =
|
||||
tokio::task::spawn_blocking(move || index_scheduler.register(task))
|
||||
.await??
|
||||
.into();
|
||||
|
||||
Ok(HttpResponse::Accepted().json(task))
|
||||
} else {
|
||||
|
@ -156,7 +159,10 @@ pub async fn update_index(
|
|||
primary_key: body.primary_key,
|
||||
};
|
||||
|
||||
let task = tokio::task::spawn_blocking(move || index_scheduler.register(task)).await??;
|
||||
let task: SummarizedTaskView =
|
||||
tokio::task::spawn_blocking(move || index_scheduler.register(task))
|
||||
.await??
|
||||
.into();
|
||||
|
||||
debug!("returns: {:?}", task);
|
||||
Ok(HttpResponse::Accepted().json(task))
|
||||
|
@ -169,7 +175,10 @@ pub async fn delete_index(
|
|||
let task = KindWithContent::IndexDeletion {
|
||||
index_uid: index_uid.into_inner(),
|
||||
};
|
||||
let task = tokio::task::spawn_blocking(move || index_scheduler.register(task)).await??;
|
||||
let task: SummarizedTaskView =
|
||||
tokio::task::spawn_blocking(move || index_scheduler.register(task))
|
||||
.await??
|
||||
.into();
|
||||
|
||||
Ok(HttpResponse::Accepted().json(task))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue