Skip to content

Commit

Permalink
Fix HTTP return code
Browse files Browse the repository at this point in the history
  • Loading branch information
hoh committed Dec 17, 2024
1 parent 4f68f5a commit a55d3d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/monitoring_proxy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def check_scoring_node_sync(response: Response) -> ScoringNodeSyncStatus:
"""
node_status = await get_node_sync_status()
response.status_code = (
status.HTTP_201_CREATED
status.HTTP_200_OK
if node_status.acceptable
else status.HTTP_503_SERVICE_UNAVAILABLE
)
Expand All @@ -43,7 +43,7 @@ async def check_metrics_age(response: Response) -> MetricsAge:
"""
metrics_age = await get_metrics_age_by_node()
response.status_code = (
status.HTTP_201_CREATED
status.HTTP_200_OK
if metrics_age.acceptable
else status.HTTP_503_SERVICE_UNAVAILABLE
)
Expand Down

0 comments on commit a55d3d1

Please sign in to comment.