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:
parent
42ba485794
commit
eeb7db96b8
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue