Fix formatting (#299)

This commit is contained in:
Lev Kokotov
2023-01-28 09:17:49 -08:00
committed by GitHub
parent fbe256cc4e
commit 2e3eb2663e

View File

@@ -128,6 +128,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
"{}:{}",
config.general.host, config.general.prometheus_exporter_port
);
let http_addr = match SocketAddr::from_str(&http_addr_str) {
Ok(addr) => addr,
Err(err) => {
@@ -135,6 +136,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
std::process::exit(exitcode::CONFIG);
}
};
tokio::task::spawn(async move {
start_metric_server(http_addr).await;
});
@@ -179,6 +181,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut autoreload_interval = tokio::time::interval(tokio::time::Duration::from_millis(15_000));
let autoreload_client_server_map = client_server_map.clone();
tokio::task::spawn(async move {
loop {
autoreload_interval.tick().await;
@@ -200,12 +203,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let (shutdown_tx, _) = broadcast::channel::<()>(1);
let (drain_tx, mut drain_rx) = mpsc::channel::<i32>(2048);
let (exit_tx, mut exit_rx) = mpsc::channel::<()>(1);
info!("Waiting for clients");
let mut admin_only = false;
let mut total_clients = 0;
info!("Waiting for clients");
loop {
tokio::select! {
// Reload config:
@@ -279,7 +281,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.await
{
Ok(()) => {
let duration = chrono::offset::Utc::now().naive_utc() - start;
if config.general.log_client_disconnections {