Skip to content

Commit

Permalink
chore: reduce loggers
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Apr 22, 2024
1 parent 16625be commit 4a4dd28
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions a_sync/primitives/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ async def _worker_coro(self) -> NoReturn:
try:
fut.set_result(e)
except UnboundLocalError as u:
logger.error("%s is broken!!!", self)
logger.error("%s for %s is broken!!!", type(self).__name__, self.func)
if str(e) != "local variable 'fut' referenced before assignment":
logger.exception(u)
raise u
Expand Down Expand Up @@ -258,15 +258,13 @@ async def _worker_coro(self) -> NoReturn:
fut: asyncio.Future[V]
while True:
try:
logger.info("getting next for %s", self)
args, kwargs, fut = await self.get()
logger.info("got args: %s kwargs: %s fut: %s", args, kwargs, fut)
fut.set_result(await self.func(*args, **kwargs))
except Exception as e:
try:
fut.set_result(e)
except UnboundLocalError as u:
logger.error("%s is broken!!!", self)
logger.error("%s for %s is broken!!!", type(self).__name__, self.func)
if str(e) != "local variable 'fut' referenced before assignment":
logger.exception(u)
raise u
Expand Down

0 comments on commit 4a4dd28

Please sign in to comment.