mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
feat(http): implement is_indexing for stats
This commit is contained in:
parent
09d9a29176
commit
87412f63ef
9 changed files with 65 additions and 22 deletions
|
@ -354,7 +354,13 @@ impl IndexController {
|
|||
pub async fn get_stats(&self, uid: String) -> anyhow::Result<IndexStats> {
|
||||
let uuid = self.uuid_resolver.get(uid.clone()).await?;
|
||||
|
||||
Ok(self.index_handle.get_index_stats(uuid).await?)
|
||||
let stats = self.index_handle.get_index_stats(uuid);
|
||||
let is_indexing = self.update_handle.is_locked(uuid);
|
||||
|
||||
Ok(IndexStats {
|
||||
is_indexing: is_indexing.await?,
|
||||
..stats.await?
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue