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