mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Make websocket failover if no connection can be made on startup or during runtime.
This commit is contained in:
parent
fa71beb03f
commit
fa25809e7a
2 changed files with 29 additions and 7 deletions
|
@ -71,6 +71,7 @@ COMMITS_BEHIND = None
|
|||
|
||||
UMASK = None
|
||||
|
||||
POLLING_FAILOVER = False
|
||||
|
||||
def initialize(config_file):
|
||||
with INIT_LOCK:
|
||||
|
@ -80,6 +81,7 @@ def initialize(config_file):
|
|||
global CURRENT_VERSION
|
||||
global LATEST_VERSION
|
||||
global UMASK
|
||||
global POLLING_FAILOVER
|
||||
|
||||
CONFIG = plexpy.config.Config(config_file)
|
||||
|
||||
|
@ -281,7 +283,7 @@ def initialize_scheduler():
|
|||
schedule_job(plextv.get_real_pms_url, 'Refresh Plex Server URLs', hours=12, minutes=0, seconds=0)
|
||||
|
||||
# If we're not using websockets then fall back to polling
|
||||
if not CONFIG.MONITORING_USE_WEBSOCKET:
|
||||
if not CONFIG.MONITORING_USE_WEBSOCKET or POLLING_FAILOVER:
|
||||
schedule_job(monitor.check_active_sessions, 'Check for active sessions',
|
||||
hours=0, minutes=0, seconds=seconds)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue