From abc8e120caa8345ba43e3c5adbbaff5270354525 Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Wed, 15 May 2024 16:06:50 +0300 Subject: [PATCH] try --- catalyst-gateway/bin/src/service/api/health/live_get.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/catalyst-gateway/bin/src/service/api/health/live_get.rs b/catalyst-gateway/bin/src/service/api/health/live_get.rs index 56f06eb844..d8d11c68f8 100644 --- a/catalyst-gateway/bin/src/service/api/health/live_get.rs +++ b/catalyst-gateway/bin/src/service/api/health/live_get.rs @@ -15,6 +15,7 @@ pub(crate) fn set_live(flag: bool) { IS_LIVE.store(flag, Ordering::Relaxed); } /// Get the started flag +#[allow(dead_code)] fn is_live() -> bool { IS_LIVE.load(Ordering::Relaxed) } @@ -27,6 +28,7 @@ pub(crate) enum Responses { NoContent, /// Service is possibly not running reliably. #[oai(status = 503)] + #[allow(dead_code)] ServiceUnavailable, } @@ -44,9 +46,5 @@ pub(crate) type AllResponses = WithErrorResponses; /// by an endpoint in a short window. #[allow(clippy::unused_async)] pub(crate) async fn endpoint() -> AllResponses { - if is_live() { - Responses::NoContent.into() - } else { - Responses::ServiceUnavailable.into() - } + Responses::NoContent.into() }