From f74513eb0da7f340479eab6722654f15d6bc5e9b Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 16 Dec 2024 03:45:31 -0400 Subject: [PATCH] Update address.py --- eth_portfolio/_ledgers/address.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eth_portfolio/_ledgers/address.py b/eth_portfolio/_ledgers/address.py index f7deef1a..ed7bdc1d 100644 --- a/eth_portfolio/_ledgers/address.py +++ b/eth_portfolio/_ledgers/address.py @@ -487,11 +487,16 @@ async def __worker_coro(queue: asyncio.Queue, ready_queue: asyncio.Queue) -> NoR put_result = ready_queue.put_nowait while True: - nonce = await get_next_job() try: - put_result(await load_transaction(address, nonce, load_prices)) + nonce = await get_next_job() + try: + put_result(await load_transaction(address, nonce, load_prices)) + except Exception as e: + put_result((nonce, e)) except Exception as e: - put_result(nonce, e) + logger.error(f"%s in %s __worker_coro", type(e), self) + logger.exception(e) + raise def __stop_workers(self) -> None: for _ in range(len(_workers)):