Commit 89250ec6 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos/collect: Call VACUUM to clean up the sql database size.

parent 567e92f9
......@@ -287,6 +287,7 @@ class Database:
if table not in self.preserve_table_list:
self._execute(delete_sql % (table, where_clause))
self._execute("VACUUM;")
self.commit()
  • We are using python3.5 so it's not a problem yet, but on python3.6 this causes sqlite3.OperationalError: cannot VACUUM from within a transaction

    I added a fix to the "list of python 3.6 compatibility fixes" in !146 (closed)

Please register or sign in to reply
self.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment