Skip to content

Commit

Permalink
Merge branch 'scheduling-error-handling-cancelling' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
rcschrg committed Jan 27, 2025
2 parents a7a7e08 + 29cab08 commit 70cbadd
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions mango/agent/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,16 @@ def _raise_exceptions(self, fut: asyncio.Future):
Inline function used as a callback to raise exceptions
:param fut: The Future object of the task
"""
if fut.exception() is not None:
logger.error(
"Agent %s: Caught the following exception in _check_inbox: ",
self.aid,
fut.exception(),
)
raise fut.exception()
try:
if fut.exception() is not None:
logger.error(
"Agent %s: Caught the following exception in _check_inbox: ",
self.aid,
fut.exception(),
)
raise fut.exception()
except asyncio.CancelledError:
pass

async def _check_inbox(self):
"""Task for waiting on new message in the inbox"""
Expand Down

0 comments on commit 70cbadd

Please sign in to comment.