Skip to content

Commit

Permalink
Move result log msg up and drop else block
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Jan 28, 2023
1 parent 73a720c commit 710dee0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tractor/_portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,10 @@ async def open_context(
f'actor: {uid}'
)
result = await ctx.result()
log.runtime(
f'Context {fn_name} returned '
f'value from callee `{result}`'
)

# though it should be impossible for any tasks
# operating *in* this scope to have survived
Expand All @@ -518,12 +522,6 @@ async def open_context(
f'task:{cid}\n'
f'actor:{uid}'
)
else:
log.runtime(
f'Context {fn_name} returned '
f'value from callee `{result}`'
)

# XXX: (MEGA IMPORTANT) if this is a root opened process we
# wait for any immediate child in debug before popping the
# context from the runtime msg loop otherwise inside
Expand Down

0 comments on commit 710dee0

Please sign in to comment.