Change `_Cache` reuse emit to `.runtime()`

runtime_to_msgspec
Tyler Goodlet 2024-06-18 14:40:26 -04:00
parent 72df312e71
commit 83d69fe395
1 changed files with 4 additions and 1 deletions

View File

@ -271,8 +271,11 @@ async def maybe_open_context(
yield False, yielded yield False, yielded
else: else:
log.info(f'Reusing _Cached resource for {ctx_key}')
_Cache.users += 1 _Cache.users += 1
log.runtime(
f'Reusing resource for `_Cache` user {_Cache.users}\n\n'
f'{ctx_key!r} -> {yielded!r}\n'
)
lock.release() lock.release()
yield True, yielded yield True, yielded