From a04340211451b45201d490e00a43c06770accd70 Mon Sep 17 00:00:00 2001 From: p1r473 Date: Tue, 13 Jun 2017 16:34:44 -0400 Subject: [PATCH] Vacuuming (#34) Added database vacuuming to shrink DB size on hard drive of old hashes that went missing --- src/bitrot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bitrot.py b/src/bitrot.py index 470c4f0..a34c4f7 100755 --- a/src/bitrot.py +++ b/src/bitrot.py @@ -261,6 +261,9 @@ class Bitrot(object): cur.execute('DELETE FROM bitrot WHERE path=?', (path,)) conn.commit() + + if not self.test: + cur.execute('vacuum') if self.verbosity: cur.execute('SELECT COUNT(path) FROM bitrot')