From 83d69fe395d324357e07460f533022126239d849 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 18 Jun 2024 14:40:26 -0400 Subject: [PATCH] Change `_Cache` reuse emit to `.runtime()` --- tractor/trionics/_mngrs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tractor/trionics/_mngrs.py b/tractor/trionics/_mngrs.py index f57be0a..08e70ad 100644 --- a/tractor/trionics/_mngrs.py +++ b/tractor/trionics/_mngrs.py @@ -271,8 +271,11 @@ async def maybe_open_context( yield False, yielded else: - log.info(f'Reusing _Cached resource for {ctx_key}') _Cache.users += 1 + log.runtime( + f'Reusing resource for `_Cache` user {_Cache.users}\n\n' + f'{ctx_key!r} -> {yielded!r}\n' + ) lock.release() yield True, yielded