feat(http): store processing as RwLock<Option<Uuid>> in index_actor

This commit is contained in:
Alexey Shekhirin 2021-04-07 18:57:46 +03:00
parent 87412f63ef
commit 698a1ea582
No known key found for this signature in database
GPG key ID: AF9A26AA133B5B98
2 changed files with 28 additions and 19 deletions

View file

@ -354,13 +354,7 @@ impl IndexController {
pub async fn get_stats(&self, uid: String) -> anyhow::Result<IndexStats> {
let uuid = self.uuid_resolver.get(uid.clone()).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?
})
Ok(self.index_handle.get_index_stats(uuid).await?)
}
}