Always commit before Db VACUUM
This commit is contained in:
parent
572d55752c
commit
446641c31c
2 changed files with 2 additions and 1 deletions
|
@ -130,5 +130,4 @@ class ChartDb(Db):
|
|||
{"date_added_limit": time.time() - 60 * 60 * 24 * 30 }
|
||||
)
|
||||
if week_back > 1:
|
||||
self.commit("vacuum")
|
||||
self.execute("VACUUM")
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue