Fixed wiki failure detection (was marking rarely checked wikis as flagged)

This commit is contained in:
Frisk 2024-07-31 14:02:58 +02:00
parent cec57a1309
commit 4735e04924

View file

@ -143,7 +143,7 @@ class Domain:
for log in logs_last_10:
if log.type == LogType.CONNECTION_ERROR:
failures += 1
if len(logs_last_10)/2 <= failures:
if max(len(logs_last_10)/2, 1) <= failures:
affected.add(wiki_url)
if len(affected) > len(self)/5:
return affected