1
0
Fork 0
mirror of https://github.com/kemayo/leech synced 2025-12-24 01:10:47 +01:00

Explicitly VACUUM the cache on flush

This commit is contained in:
David Lynch 2018-01-19 14:21:05 -06:00
parent 2042f813d0
commit b8123e0b26

View file

@ -5,6 +5,7 @@ import sys
import json
import http.cookiejar
import logging
import sqlite3
import sites
import ebook
@ -66,6 +67,11 @@ if __name__ == '__main__':
if args.flush:
requests_cache.install_cache('leech')
requests_cache.clear()
conn = sqlite3.connect('leech.sqlite')
conn.execute("VACUUM")
conn.close()
logger.info("Flushed cache")
sys.exit()