Skip to content

Commit

Permalink
fix: persisted task exc handling (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Feb 25, 2024
1 parent 8db00ef commit 31dd418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion a_sync/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __persist(task: "asyncio.Task[Any]") -> None:
def __prune_persisted_tasks():
for task in tuple(__persisted_tasks):
if task.done():
if e := task.exception() and not isinstance(e, exceptions.PersistedTaskException):
if (e := task.exception()) and not isinstance(e, exceptions.PersistedTaskException):
logger.exception(e)
raise e
__persisted_tasks.discard(task)
Expand Down

0 comments on commit 31dd418

Please sign in to comment.