Cap time until full at 1 billion seconds

JSON can't represent infinity (at least not portably) so we need to use
a finite value. I certainly won't be worried if a disk will fill up in
32 years.
This commit is contained in:
Peter J. Holzer 2022-12-12 01:00:00 +01:00 committed by Peter J. Holzer
parent 42ba485794
commit eeb7db96b8
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class DiskFullPredictor:
return return
current_used_bytes = lts.data[-1][1] current_used_bytes = lts.data[-1][1]
current_usable_bytes = usable_lts.data[-1][1] current_usable_bytes = usable_lts.data[-1][1]
tuf = float('inf') tuf = 1E9
for d in reversed(lts.data): for d in reversed(lts.data):
if d[1] < current_usable_bytes * 0.1: if d[1] < current_usable_bytes * 0.1:
continue # for sanity continue # for sanity