сhore: code refactoring

This commit is contained in:
ITQ
2025-01-26 17:41:17 +03:00
parent 9865480060
commit 424b0e7463
8 changed files with 40 additions and 28 deletions
@@ -10,7 +10,9 @@ class AntifraudHealthCheck(BaseHealthCheckBackend):
def check_status(self) -> None:
try:
response = httpx.get(f"{settings.ANTIFRAUD_ADDRESS}/api/ping")
response = httpx.get(
f"{settings.ANTIFRAUD_ADDRESS}/api/ping", timeout=1
)
if response.status_code >= status.INTERNAL_SERVER_ERROR:
self.add_error("Antifraud service is unaccessible")
except httpx.HTTPError: