From: Scott Worley Date: Fri, 10 Jul 2020 07:37:02 +0000 (-0700) Subject: Remove blocksize-multiple check X-Git-Tag: v1.0.1~1 X-Git-Url: http://git.scottworley.com/nix-currently-building/commitdiff_plain/24d5e0c8ba13999313fc05d3d66aba4b60ac2872?ds=inline Remove blocksize-multiple check This check is not reliable. Sometimes in-progress logs are not a multiple of the block size. --- 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'))