]> git.scottworley.com Git - nix-currently-building/commitdiff
Remove blocksize-multiple check
authorScott Worley <scottworley@scottworley.com>
Fri, 10 Jul 2020 07:37:02 +0000 (00:37 -0700)
committerScott Worley <scottworley@scottworley.com>
Fri, 10 Jul 2020 07:37:02 +0000 (00:37 -0700)
This check is not reliable.  Sometimes in-progress logs are not a
multiple of the block size.

nix_currently_building.py

index 1b507c8ea6d328e3507e20ec69239e3b070ae9b1..afe1ee412528c87c9043b05ba457e401442899a7 100755 (executable)
@@ -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'))