Ticker system isn't working - this is a push to add some diagnostics

This commit is contained in:
Herbert Wolverson
2024-07-18 13:12:10 -05:00
parent a6c527bdb0
commit 0c74ee56c3

View File

@@ -1,6 +1,6 @@
use std::sync::Arc; use std::sync::Arc;
use tokio::spawn; use tokio::{join, spawn};
use crate::node_manager::ws::publish_subscribe::PubSub; use crate::node_manager::ws::publish_subscribe::PubSub;
mod cadence; mod cadence;
mod throughput; mod throughput;
@@ -21,9 +21,8 @@ pub use network_tree::{Circuit, all_circuits};
/// Runs a periodic tick to feed data to the node manager. /// Runs a periodic tick to feed data to the node manager.
pub(super) async fn channel_ticker(channels: Arc<PubSub>) { pub(super) async fn channel_ticker(channels: Arc<PubSub>) {
let mc = channels.clone(); spawn(async move { one_second_cadence(mc) }); log::info!("Starting channel tickers");
let mc = channels.clone(); spawn(async move { two_second_cadence(mc) }); join!(one_second_cadence(channels.clone()), two_second_cadence(channels.clone()), five_second_cadence(channels.clone()));
let mc = channels.clone(); spawn(async move { five_second_cadence(mc) });
} }
async fn one_second_cadence(channels: Arc<PubSub>) { async fn one_second_cadence(channels: Arc<PubSub>) {