Fix 'sqlite3.OperationalError: cannot VACUUM from within a transaction'.
This commit is contained in:
parent
92b41b0202
commit
c70ed692e4
|
@ -48,8 +48,8 @@ def clean(older_than=timedelta(days=3)):
|
|||
""", {
|
||||
"cutoff": (datetime.utcnow() - older_than).timestamp(),
|
||||
})
|
||||
connection.execute("VACUUM;")
|
||||
connection.commit()
|
||||
connection.executescript("VACUUM;")
|
||||
|
||||
|
||||
last_request = defaultdict(float)
|
||||
|
|
Reference in a new issue