Vacuuming (#34)
Added database vacuuming to shrink DB size on hard drive of old hashes that went missing
This commit is contained in:
parent
a8e52626ef
commit
a043402114
@ -261,6 +261,9 @@ class Bitrot(object):
|
|||||||
cur.execute('DELETE FROM bitrot WHERE path=?', (path,))
|
cur.execute('DELETE FROM bitrot WHERE path=?', (path,))
|
||||||
|
|
||||||
conn.commit()
|
conn.commit()
|
||||||
|
|
||||||
|
if not self.test:
|
||||||
|
cur.execute('vacuum')
|
||||||
|
|
||||||
if self.verbosity:
|
if self.verbosity:
|
||||||
cur.execute('SELECT COUNT(path) FROM bitrot')
|
cur.execute('SELECT COUNT(path) FROM bitrot')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user