Skip to content

Commit

Permalink
Log when Worker loop is disrupted
Browse files Browse the repository at this point in the history
  • Loading branch information
catileptic committed Dec 13, 2024
1 parent 74329d9 commit fd4052f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions servicelayer/taskqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,10 @@ def process_blocking(self):
channel.connection.add_callback_threadsafe(cb)
except Empty:
pass
except Exception:
log.exception(f"Worker loop has been disrupted while handling task"
f" {task.id or 'Unknown ID'} from collection"
f" {task.collection_id or 'Unknown ID'}")
finally:
clear_contextvars()

Expand Down

0 comments on commit fd4052f

Please sign in to comment.