mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Add button to clear notification logs
This commit is contained in:
parent
b39e7bbb6d
commit
7f5d9bec87
3 changed files with 44 additions and 1 deletions
|
@ -1206,4 +1206,16 @@ class DataFactory(object):
|
|||
'draw': query['draw']
|
||||
}
|
||||
|
||||
return dict
|
||||
return dict
|
||||
|
||||
def delete_notification_log(self):
|
||||
monitor_db = database.MonitorDatabase()
|
||||
|
||||
try:
|
||||
logger.info(u"PlexPy DataFactory :: Clearing notification logs from database.")
|
||||
monitor_db.action('DELETE FROM notify_log')
|
||||
monitor_db.action('VACUUM')
|
||||
return 'Cleared notification logs.'
|
||||
except Exception as e:
|
||||
logger.warn(u"PlexPy DataFactory :: Unable to execute database query for delete_notification_log: %s." % e)
|
||||
return 'Unable to clear notification logs.'
|
Loading…
Add table
Add a link
Reference in a new issue