mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Add database integrity check to status API
This commit is contained in:
parent
4743538de8
commit
f1376fb2ca
3 changed files with 28 additions and 6 deletions
|
@ -27,6 +27,12 @@ FILENAME = "tautulli.db"
|
|||
db_lock = threading.Lock()
|
||||
|
||||
|
||||
def integrity_check():
|
||||
monitor_db = MonitorDatabase()
|
||||
result = monitor_db.select_single('PRAGMA integrity_check')
|
||||
return result
|
||||
|
||||
|
||||
def drop_session_db():
|
||||
monitor_db = MonitorDatabase()
|
||||
monitor_db.action('DROP TABLE sessions')
|
||||
|
@ -53,6 +59,7 @@ def delete_sessions():
|
|||
logger.warn(u"Tautulli Database :: Unable to clear temporary sessions from database: %s." % e)
|
||||
return False
|
||||
|
||||
|
||||
def db_filename(filename=FILENAME):
|
||||
""" Returns the filepath to the db """
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue