feat(http): calculate updates' and uuids' dbs size

This commit is contained in:
Alexey Shekhirin 2021-04-09 15:41:24 +03:00
parent ae1655586c
commit adfdb99abc
No known key found for this signature in database
GPG key ID: AF9A26AA133B5B98
17 changed files with 121 additions and 25 deletions

View file

@ -356,6 +356,16 @@ impl IndexController {
Ok(self.index_handle.get_index_stats(uuid).await?)
}
pub async fn get_updates_size(&self, uid: String) -> anyhow::Result<u64> {
let uuid = self.uuid_resolver.get(uid.clone()).await?;
Ok(self.update_handle.get_size(uuid).await?)
}
pub async fn get_uuids_size(&self) -> anyhow::Result<u64> {
Ok(self.uuid_resolver.get_size().await?)
}
}
pub async fn get_arc_ownership_blocking<T>(mut item: Arc<T>) -> T {