Skip to content

Commit

Permalink
fallback for empty health check
Browse files Browse the repository at this point in the history
  • Loading branch information
leftmove authored Jun 27, 2024
1 parent 46a3289 commit 880884d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/routers/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def health():
health_checks.append(False)
continue

health_passed = sum(health_checks) / len(health_checks)
health_passed = sum(health_checks) / len(health_checks) if health_checks else 0
if health_passed < 0.8:
raise HTTPException(status_code=500, detail="The server doesn't seem healthy.")

Expand Down

0 comments on commit 880884d

Please sign in to comment.