mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Make monitor websocket ping/pong an advanced config option
This commit is contained in:
parent
4ef36a464a
commit
97cf2ebe19
3 changed files with 4 additions and 2 deletions
|
@ -422,7 +422,7 @@ def initialize_scheduler():
|
|||
schedule_job(activity_pinger.connect_server, 'Check for server response',
|
||||
hours=0, minutes=0, seconds=0)
|
||||
schedule_job(web_socket.send_ping, 'Websocket ping',
|
||||
hours=0, minutes=0, seconds=10)
|
||||
hours=0, minutes=0, seconds=10 * bool(CONFIG.WEBSOCKET_MONITOR_PING_PONG))
|
||||
|
||||
else:
|
||||
# Cancel all jobs
|
||||
|
|
|
@ -607,6 +607,7 @@ _CONFIG_DEFINITIONS = {
|
|||
'UPDATE_NOTIFIERS_DB': (int, 'General', 1),
|
||||
'VERIFY_SSL_CERT': (bool_int, 'Advanced', 1),
|
||||
'VIDEO_LOGGING_ENABLE': (int, 'Monitoring', 1),
|
||||
'WEBSOCKET_MONITOR_PING_PONG': (int, 'Advanced', 0),
|
||||
'WEBSOCKET_CONNECTION_ATTEMPTS': (int, 'Advanced', 5),
|
||||
'WEBSOCKET_CONNECTION_TIMEOUT': (int, 'Advanced', 5),
|
||||
'WEEK_START_MONDAY': (int, 'General', 0),
|
||||
|
|
|
@ -60,7 +60,8 @@ def on_connect():
|
|||
plexpy.PLEX_SERVER_UP = True
|
||||
|
||||
plexpy.initialize_scheduler()
|
||||
send_ping()
|
||||
if plexpy.CONFIG.WEBSOCKET_MONITOR_PING_PONG:
|
||||
send_ping()
|
||||
|
||||
|
||||
def on_disconnect():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue