@@ -11,3 +11,4 @@ tracing-subscriber.workspace = true
|
||||
clap.workspace = true
|
||||
dotenv.workspace = true
|
||||
axum.workspace = true
|
||||
reqwest.workspace = true
|
||||
|
@@ -51,9 +51,11 @@ async fn handle_command(cmd: Command) -> anyhow::Result<()> {
|
||||
} => todo!(),
|
||||
Commands::Health { server, agent } => {
|
||||
tracing::info!("connecting to server: {}", server);
|
||||
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
|
||||
reqwest::get(format!("{server}/ping")).await?;
|
||||
tracing::info!("connected to server successfully");
|
||||
tracing::info!("connecting to agent: {}", agent);
|
||||
tokio::time::sleep(std::time::Duration::from_secs(5)).await;
|
||||
reqwest::get(format!("{agent}/ping")).await?;
|
||||
tracing::info!("connected to agent successfully");
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user