- update: health check status output to health log
This commit is contained in:
@@ -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()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user