[add]: Events Service health check

This commit was merged in pull request #59.
This commit is contained in:
VivianDee
2025-10-06 18:22:49 +01:00
parent 06b266c3a7
commit 244f648974
3 changed files with 55 additions and 12 deletions
+17
View File
@@ -50,3 +50,20 @@ class EventServiceIntegration:
except Exception as e:
logger.error(f"Direct Repayment API call failed: {str(e)}", exc_info=True)
raise
@staticmethod
def health_check():
"""
Health check for Events Service
"""
url = f"{EventServiceIntegration.EVENTS_SERVICE_BASE_URL}/health"
logger.info(f"Health Check URL: {url}")
try:
response = httpx.get(url, timeout=5.0)
logger.info(f"Health Check Response: {response.text}")
return response
except Exception as e:
logger.error(f"Health Check API call failed: {str(e)}", exc_info=True)
raise