reduce timestamps to 1s resolution
authorHelmut Grohne <helmut@subdivi.de>
Tue, 5 Mar 2019 18:47:32 +0000 (19:47 +0100)
committerHelmut Grohne <helmut@subdivi.de>
Tue, 5 Mar 2019 18:47:32 +0000 (19:47 +0100)
We don't need more resolution. It is a distraction and removing it saves
around 1% of db size.

build.py
depcheck.py

index c3343f6..86791fe 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -25,7 +25,7 @@ def scan_log_status(filelike):
 
 
 def do_build(source, version, architecture, server):
-    now = datetime.datetime.utcnow()
+    now = datetime.datetime.utcnow().replace(microsecond=0)
     logtarget = "%s_%s_%s_%s.log.xz" % (source, version, architecture,
                                         now.strftime("%Y%m%d%H%M%S"))
     cmdline = ["ssh", server, "sh", "/dev/stdin", architecture,
index 3bbe2d7..884f2ad 100755 (executable)
@@ -453,7 +453,7 @@ def main():
                 (mirror.releasetime,))
     archs = set(row[0] for row in cur.fetchall())
     print("checking %s" % " ".join(sorted(archs)))
-    now = datetime.datetime.utcnow()
+    now = datetime.datetime.utcnow().replace(microsecond=0)
     mapper = multiprocessing.Pool().imap_unordered if args.parallel else map
     for architecture, state in mapper(functools.partial(main_docheck, mirror),
                                       archs):