def start_thread(): # Check for any existing sessions on start up activity_pinger.check_active_sessions(ws_request=True) # Start the websocket listener on it's own thread thread = threading.Thread(target=run) thread.daemon = True thread.start()
def start_thread(): try: # Check for any existing sessions on start up activity_pinger.check_active_sessions(ws_request=True) except Exception as e: logger.error("Tautulli WebSocket :: Failed to check for active sessions: %s." % e) logger.warn("Tautulli WebSocket :: Attempt to fix by flushing temporary sessions...") database.delete_sessions() # Start the websocket listener on it's own thread thread = threading.Thread(target=run) thread.daemon = True thread.start()
def start_thread(): # Check for any existing sessions on start up activity_pinger.check_active_sessions(ws_request=True) # Start the websocket listener on it's own thread threading.Thread(target=run).start()