min checks bug

This commit is contained in:
2026-02-13 11:29:15 -06:00
parent d0f50141c7
commit dae0882e0f

View File

@@ -277,15 +277,8 @@ class ServiceMonitor:
if total_count == 0: if total_count == 0:
return None return None
# Minimum-data thresholds if total_count < 3:
if hours: return None
expected_checks = (hours * 3600) / CHECK_INTERVAL
minimum_checks = max(3, expected_checks * 0.5)
if total_count < minimum_checks:
return None
else:
if total_count < 3:
return None
return round((online_count / total_count) * 100, 2) return round((online_count / total_count) * 100, 2)
finally: finally: