Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

Commit

Permalink
fix: Add error handling around update_plex_item to prevent hang
Browse files Browse the repository at this point in the history
  • Loading branch information
zdimension authored and ReenigneArcher committed Nov 7, 2023
1 parent a1e1847 commit 2f67afe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Contents/Code/plex_api_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Check warning on line 508 in Contents/Code/plex_api_helper.py

View check run for this annotation

Codecov / codecov/patch

Contents/Code/plex_api_helper.py#L505-L508

Added lines #L505 - L508 were not covered by tests
q.task_done() # tells the queue that we are done with this item


Expand Down

0 comments on commit 2f67afe

Please sign in to comment.