- update: health check status output to health log

This commit is contained in:
2024-12-17 20:03:12 -05:00
parent ee29fef634
commit aaa7143b11
2 changed files with 4 additions and 2 deletions

View File

@@ -86,8 +86,10 @@ pub async fn start_health_check(service_address: &str) -> Result<(), Box<dyn std
let health_check_endpoint_addr = format!("{}:{}", service_address, health_port);
// Start health-check endpoint
let log = warp::log("health_check");
let health_route = warp::path!("health")
.map(|| warp::reply::with_status("OK", warp::http::StatusCode::OK));
.map(|| warp::reply::with_status("OK", warp::http::StatusCode::OK))
.with(log);
tokio::spawn(warp::serve(health_route).run(health_check_endpoint_addr.to_socket_addrs()?.next().unwrap()));