From 8845be4e0355ed76abb5709fe671c1eb9531e999 Mon Sep 17 00:00:00 2001 From: Mike Shultz Date: Fri, 12 Jul 2024 14:38:43 -0600 Subject: [PATCH] fix: awaiting sync func --- silverback/subscriptions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/silverback/subscriptions.py b/silverback/subscriptions.py index 4d528a26..b75f92eb 100644 --- a/silverback/subscriptions.py +++ b/silverback/subscriptions.py @@ -139,7 +139,7 @@ async def get_subscription_data_nowait(self, sub_id: str) -> AsyncGenerator[dict await self.__anext__() else: try: - yield await queue.get_nowait() + yield queue.get_nowait() except asyncio.QueueEmpty: pass @@ -154,7 +154,7 @@ async def pop_subscription_data(self, sub_id: str) -> Union[dict, None]: if queue: try: - return await queue.get_nowait() + return queue.get_nowait() except asyncio.QueueEmpty: pass