Vacuuming (#34)

Added database vacuuming to shrink DB size on hard drive of old hashes that went missing
This commit is contained in:
p1r473 2017-06-13 16:34:44 -04:00 committed by Łukasz Langa
parent a8e52626ef
commit a043402114

View File

@ -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')