Always commit before Db VACUUM

This commit is contained in:
shortcutme 2019-04-15 22:11:44 +02:00
parent 572d55752c
commit 446641c31c
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 2 additions and 1 deletions

View file

@ -83,6 +83,8 @@ class DbCursor:
return query, params
def execute(self, query, params=None):
if query.upper().strip("; ") == "VACUUM":
self.db.commit("vacuum called")
query = query.strip()
while self.db.progress_sleeping:
time.sleep(0.1)