From eeb7db96b85738efd4961520ed813d474fab303d Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Mon, 12 Dec 2022 01:00:00 +0100 Subject: [PATCH] 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. --- process_queue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process_queue b/process_queue index 2886862..e5147ff 100644 --- a/process_queue +++ b/process_queue @@ -35,7 +35,7 @@ class DiskFullPredictor: return current_used_bytes = lts.data[-1][1] current_usable_bytes = usable_lts.data[-1][1] - tuf = float('inf') + tuf = 1E9 for d in reversed(lts.data): if d[1] < current_usable_bytes * 0.1: continue # for sanity