diff --git a/src/stats/actor.rs b/src/stats/actor.rs index d14c5b88..ece557ab 100644 --- a/src/stats/actor.rs +++ b/src/stats/actor.rs @@ -80,6 +80,10 @@ impl StatsActor { let result = self.drivers_stats().await; let _ = response.send(result); } + StatsCommand::GetHubStats { response } => { + let result = self.hub_stats().await; + let _ = response.send(result); + } } } diff --git a/src/stats/protocol.rs b/src/stats/protocol.rs index a95930e2..62422d4a 100644 --- a/src/stats/protocol.rs +++ b/src/stats/protocol.rs @@ -1,7 +1,7 @@ use anyhow::Result; use tokio::sync::oneshot; -use crate::stats::DriversStats; +use crate::stats::{DriversStats, StatsInner}; pub enum StatsCommand { SetPeriod { @@ -14,4 +14,7 @@ pub enum StatsCommand { GetDriversStats { response: oneshot::Sender>, }, + GetHubStats { + response: oneshot::Sender>, + }, }