From d2f00fe2fb637b7f9f29a559e5120ed23aa254b8 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:19:59 -0400 Subject: [PATCH] fix: early exit when debug logs not enabled --- eth_portfolio/_ydb/token_transfers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/eth_portfolio/_ydb/token_transfers.py b/eth_portfolio/_ydb/token_transfers.py index 74dc6d1f..42cbbd83 100644 --- a/eth_portfolio/_ydb/token_transfers.py +++ b/eth_portfolio/_ydb/token_transfers.py @@ -53,6 +53,7 @@ async def yield_thru_block(self, block) -> AsyncIterator["Task[TokenTransfer]"]: if not _logger_is_enabled_for(DEBUG): async for task in self._objects_thru(block=block): yield task + return _logger_log(DEBUG, "%s yielding all objects thru block %s", (self, block)) async for task in self._objects_thru(block=block):