From 290b0a86b1517dad543278e0dd8b834f7445fb92 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 20 Mar 2024 10:42:17 -0400 Subject: [PATCH] Another cancel-req-invalid log msg fmt tweak --- tractor/_runtime.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tractor/_runtime.py b/tractor/_runtime.py index ff929c0..ff3fb74 100644 --- a/tractor/_runtime.py +++ b/tractor/_runtime.py @@ -715,10 +715,12 @@ class Actor: f'|_{chan}\n' ) try: - # send a msg loop terminate sentinel + # send msg loop terminate sentinel which + # triggers cancellation of all remotely + # started tasks. await chan.send(None) - # XXX: do we want this? + # XXX: do we want this? no right? # causes "[104] connection reset by peer" on other end # await chan.aclose() @@ -1208,10 +1210,10 @@ class Actor: # - callee self raises ctxc before caller send request, # - callee errors prior to cancel req. log.cancel( - 'Cancel request invalid, RPC task already completed?\n' + 'Cancel request invalid, RPC task already completed?\n\n' f'<= canceller: {requesting_uid}\n\n' - f'=>{parent_chan}\n' - f' |_ctx-id: {cid}\n' + f'=> {cid}@{parent_chan.uid}\n' + f' |_{parent_chan}\n' ) return True @@ -1510,7 +1512,6 @@ async def async_main( ): accept_addrs = set_accept_addr_says_rent - # The "root" nursery ensures the channel with the immediate # parent is kept alive as a resilient service until # cancellation steps have (mostly) occurred in