From 24d5e0c8ba13999313fc05d3d66aba4b60ac2872 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Fri, 10 Jul 2020 00:37:02 -0700 Subject: [PATCH] Remove blocksize-multiple check This check is not reliable. Sometimes in-progress logs are not a multiple of the block size. --- nix_currently_building.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nix_currently_building.py b/nix_currently_building.py index 1b507c8..afe1ee4 100755 --- a/nix_currently_building.py +++ b/nix_currently_building.py @@ -3,8 +3,7 @@ import subprocess import time -BLOCK_SIZE = 4096 -MIN_AGE = time.time() - 86400 * 7 +MIN_AGE = time.time() - 86400 * 1 def removesuffix(s, suf): # Until python 3.9 @@ -20,7 +19,7 @@ def main(): for f in files: path = os.path.join(d, f) st = os.stat(path) - if (st.st_size % BLOCK_SIZE) == 0 and st.st_mtime > MIN_AGE and truncated(path): + if st.st_mtime > MIN_AGE and truncated(path): print(d[-2:] + removesuffix(f, '.bz2')) -- 2.44.1