From a99aeec9056f8b7d01ace5aa255b654ed39c75a9 Mon Sep 17 00:00:00 2001 From: BobTheBuidler Date: Mon, 6 Jan 2025 02:21:22 +0000 Subject: [PATCH] fix: RecursionError log msg when queue is broken --- a_sync/primitives/queue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a_sync/primitives/queue.py b/a_sync/primitives/queue.py index 0312f8c8..59fbc95c 100644 --- a/a_sync/primitives/queue.py +++ b/a_sync/primitives/queue.py @@ -253,11 +253,11 @@ def get_multi_nowait(self, i: int, can_return_less: bool = False) -> List[T]: def log_broken(func: Callable[[Any], NoReturn]) -> Callable[[Any], NoReturn]: @wraps(func) - async def __worker_exc_wrap(self): + async def __worker_exc_wrap(self: "ProcessingQueue"): try: return await func(self) except Exception as e: - logger.error("%s for %s is broken!!!", type(self).__name__, func) + logger.error("%s for %s is broken!!!", type(self).__name__, self.func) logger.exception(e) raise