mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Schedule database pragma optimize
This commit is contained in:
parent
02658759ea
commit
60bdf1d1ce
2 changed files with 12 additions and 1 deletions
|
@ -286,7 +286,18 @@ def vacuum():
|
|||
|
||||
|
||||
def optimize():
|
||||
monitor_db = MonitorDatabase()
|
||||
|
||||
logger.info("Tautulli Database :: Optimizing database.")
|
||||
try:
|
||||
monitor_db.action('PRAGMA optimize')
|
||||
except Exception as e:
|
||||
logger.error("Tautulli Database :: Failed to optimize database: %s" % e)
|
||||
|
||||
|
||||
def optimize_db():
|
||||
vacuum()
|
||||
optimize()
|
||||
|
||||
|
||||
def db_filename(filename=FILENAME):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue