forked from goodboy/tractor
1
0
Fork 0

Tweak log msg

msgspec_infect_asyncio
Tyler Goodlet 2020-09-24 10:15:29 -04:00
parent 0bac1f3021
commit 2adb59f40f
1 changed files with 3 additions and 1 deletions

View File

@ -95,7 +95,7 @@ async def run_task(
nonlocal err
err = task.exception()
if err:
log.exception("asyncio task errorred:")
log.exception(f"asyncio task errorred:\n{err}")
cancel_scope.cancel()
task.add_done_callback(cancel_trio)
@ -116,6 +116,7 @@ async def run_task(
# simple async func
elif inspect.iscoroutine(coro):
with cancel_scope:
# return single value
return await from_aio.receive()
@ -123,6 +124,7 @@ async def run_task(
raise err
def run_as_asyncio_guest(
trio_main: Callable,
) -> None: