From 9e53f43f935deabf25cbc6f8759e0ec6a11fe365 Mon Sep 17 00:00:00 2001 From: Sital Nagarkoti Date: Wed, 8 Jan 2025 12:58:03 +0545 Subject: [PATCH] fix: fix healthcheck in backend --- api/backend/app/services/kafka_service.py | 1 + api/healthcheck.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/backend/app/services/kafka_service.py b/api/backend/app/services/kafka_service.py index f5a9fb8ee..617539ea0 100644 --- a/api/backend/app/services/kafka_service.py +++ b/api/backend/app/services/kafka_service.py @@ -44,6 +44,7 @@ async def start(self): async def stop(self): if settings.KAFKA_ENABLED: await self.producer.stop() + await self.consumer.stop() async def publish_message(self, topic: str, message: str, key: Optional[str]): if settings.KAFKA_ENABLED: diff --git a/api/healthcheck.py b/api/healthcheck.py index e99622102..1b74c20d7 100644 --- a/api/healthcheck.py +++ b/api/healthcheck.py @@ -1,7 +1,7 @@ import requests try: - response = requests.get("http://localhost:8000/api/ready") + response = requests.get("http://localhost:8000/api/health") if response.status_code == 200: print("Healthcheck: OK") exit(0)