Skip to content

Commit c01e6dd

Browse files
authored
Merge pull request #672 from kprzybyla/one-shot-callback-exception-never-retrieved
Catch and log potential exception during the OneShotCallback task execution
2 parents c281314 + 45726f2 commit c01e6dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

aio_pika/tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,8 @@ async def __task_inner(self, *args: Any, **kwargs: Any) -> None:
304304

305305
try:
306306
await self.callback(*args, **kwargs)
307+
except Exception:
308+
log.exception("Callback %r error", self)
307309
finally:
308310
self.loop.call_soon(self.finished.set)
309311
del self.callback

0 commit comments

Comments
 (0)