mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 14:10:52 -07:00
Catch exception so websocket doesn't crash when failed to process data
This commit is contained in:
parent
bbe309e7bd
commit
cd007ee0eb
1 changed files with 10 additions and 4 deletions
|
@ -191,8 +191,11 @@ def process(opcode, data):
|
||||||
logger.debug(u"PlexPy WebSocket :: Session found but unable to get timeline data.")
|
logger.debug(u"PlexPy WebSocket :: Session found but unable to get timeline data.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
activity = activity_handler.ActivityHandler(timeline=time_line[0])
|
try:
|
||||||
activity.process()
|
activity = activity_handler.ActivityHandler(timeline=time_line[0])
|
||||||
|
activity.process()
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(u"PlexPy WebSocket :: Failed to process session data: %s." % e)
|
||||||
|
|
||||||
if type == 'timeline':
|
if type == 'timeline':
|
||||||
time_line = info.get('TimelineEntry', info.get('_children', {}))
|
time_line = info.get('TimelineEntry', info.get('_children', {}))
|
||||||
|
@ -201,7 +204,10 @@ def process(opcode, data):
|
||||||
logger.debug(u"PlexPy WebSocket :: Timeline event found but unable to get timeline data.")
|
logger.debug(u"PlexPy WebSocket :: Timeline event found but unable to get timeline data.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
activity = activity_handler.TimelineHandler(timeline=time_line[0])
|
try:
|
||||||
activity.process()
|
activity = activity_handler.ActivityHandler(timeline=time_line[0])
|
||||||
|
activity.process()
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(u"PlexPy WebSocket :: Failed to process timeline data: %s." % e)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue