From f32a6c9b14c710f754d5b36d8c0c6627c638a313 Mon Sep 17 00:00:00 2001 From: Tom Niget Date: Tue, 7 Nov 2023 17:44:01 +0100 Subject: [PATCH] fix: Add error handling around update_plex_item to prevent hang (#202) --- Contents/Code/plex_api_helper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Contents/Code/plex_api_helper.py b/Contents/Code/plex_api_helper.py index 755f90ec..28ba4a6e 100644 --- a/Contents/Code/plex_api_helper.py +++ b/Contents/Code/plex_api_helper.py @@ -502,7 +502,10 @@ def process_queue(): """ while True: rating_key = q.get() # get the rating_key from the queue - update_plex_item(rating_key=rating_key) # process that rating_key + try: + update_plex_item(rating_key=rating_key) # process that rating_key + except Exception as e: + Log.Exception('Unexpected error processing rating key: %s, error: %s' % (rating_key, e)) q.task_done() # tells the queue that we are done with this item