Skip to content

Commit

Permalink
Teardown on unhandled exceptions by work (#1406)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavsingh authored May 9, 2024
1 parent fce40f0 commit e713752
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proxy/core/work/threadless.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ async def _run_once(self) -> bool:
work_id = task._work_id # type: ignore
try:
teardown = task.result()
except Exception:
teardown = True
finally:
if teardown:
self._cleanup(work_id)
Expand Down

0 comments on commit e713752

Please sign in to comment.