You've already forked Promocode-API
mirror of
https://github.com/devitq/Promocode-API.git
synced 2026-06-10 04:32:35 +00:00
сhore: code refactoring
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user