From da472bae0b1c89dcaaceeb476bf534ed02be3003 Mon Sep 17 00:00:00 2001 From: Borja MF Date: Wed, 25 Jan 2023 09:38:40 +0100 Subject: [PATCH] Added version for Server stats.. --- src/server.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/server.rs b/src/server.rs index cdb4a34b78..c7c2ba7604 100644 --- a/src/server.rs +++ b/src/server.rs @@ -889,12 +889,14 @@ where async fn get_info(&self) -> Result { let stats = self.stats.lock().await.clone(); let cache_location = self.storage.location(); + let version = env!("CARGO_PKG_VERSION").to_string(); futures::try_join!(self.storage.current_size(), self.storage.max_size()).map( move |(cache_size, max_cache_size)| ServerInfo { stats, cache_location, cache_size, max_cache_size, + version, }, ) } @@ -1423,6 +1425,7 @@ pub struct ServerInfo { pub cache_location: String, pub cache_size: Option, pub max_cache_size: Option, + pub version: String, } /// Status of the dist client. @@ -1619,6 +1622,12 @@ impl ServerInfo { self.cache_location, name_width = name_width ); + println!( + "{: