mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Option to specify backup interval
This commit is contained in:
parent
65b3d0c0de
commit
b9bbf8bbca
4 changed files with 27 additions and 7 deletions
|
@ -331,9 +331,9 @@ def initialize_scheduler():
|
|||
schedule_job(activity_pinger.check_active_sessions, 'Check for active sessions',
|
||||
hours=0, minutes=0, seconds=seconds)
|
||||
|
||||
# Refresh the users list
|
||||
user_refresh_hours = CONFIG.REFRESH_USERS_INTERVAL or 0
|
||||
library_refresh_hours = CONFIG.REFRESH_LIBRARIES_INTERVAL or 0
|
||||
# Refresh the users list and libraries list
|
||||
user_refresh_hours = CONFIG.REFRESH_USERS_INTERVAL or 12
|
||||
library_refresh_hours = CONFIG.REFRESH_LIBRARIES_INTERVAL or 12
|
||||
|
||||
if CONFIG.PMS_TOKEN:
|
||||
schedule_job(plextv.refresh_users, 'Refresh users list',
|
||||
|
@ -343,8 +343,12 @@ def initialize_scheduler():
|
|||
schedule_job(pmsconnect.refresh_libraries, 'Refresh libraries list',
|
||||
hours=library_refresh_hours, minutes=0, seconds=0)
|
||||
|
||||
schedule_job(database.make_backup, 'Backup PlexPy database', hours=6, minutes=0, seconds=0, args=(True, True))
|
||||
schedule_job(config.make_backup, 'Backup PlexPy config', hours=6, minutes=0, seconds=0, args=(True, True))
|
||||
backup_hours = CONFIG.BACKUP_INTERVAL or 6
|
||||
|
||||
schedule_job(database.make_backup, 'Backup PlexPy database',
|
||||
hours=backup_hours, minutes=0, seconds=0, args=(True, True))
|
||||
schedule_job(config.make_backup, 'Backup PlexPy config',
|
||||
hours=backup_hours, minutes=0, seconds=0, args=(True, True))
|
||||
|
||||
# Start scheduler
|
||||
if start_jobs and len(SCHED.get_jobs()):
|
||||
|
|
|
@ -101,6 +101,7 @@ _CONFIG_DEFINITIONS = {
|
|||
'BUFFER_THRESHOLD': (int, 'Monitoring', 3),
|
||||
'BUFFER_WAIT': (int, 'Monitoring', 900),
|
||||
'BACKUP_DIR': (str, 'General', ''),
|
||||
'BACKUP_INTERVAL': (int, 'General', 6),
|
||||
'CACHE_DIR': (str, 'General', ''),
|
||||
'CACHE_IMAGES': (int, 'General', 1),
|
||||
'CACHE_SIZEMB': (int, 'Advanced', 32),
|
||||
|
|
|
@ -2527,6 +2527,7 @@ class WebInterface(object):
|
|||
"update_db_interval": plexpy.CONFIG.UPDATE_DB_INTERVAL,
|
||||
"freeze_db": checked(plexpy.CONFIG.FREEZE_DB),
|
||||
"backup_dir": plexpy.CONFIG.BACKUP_DIR,
|
||||
"backup_interval": plexpy.CONFIG.BACKUP_INTERVAL,
|
||||
"cache_dir": plexpy.CONFIG.CACHE_DIR,
|
||||
"log_dir": plexpy.CONFIG.LOG_DIR,
|
||||
"log_blacklist": checked(plexpy.CONFIG.LOG_BLACKLIST),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue