Skip to content

Commit

Permalink
chore: cleanup debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeshultz committed Jul 13, 2024
1 parent 0fb254a commit 59f9250
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions silverback/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,16 @@ async def get_subscription_data_nowait(
"""
while True:
if not (queue := self._subscriptions.get(sub_id)) or queue.empty():
logger.debug(
f"Acquiring lock for recv (no wait). (is locked? {self._ws_lock.locked()})"
)
async with self._ws_lock:
logger.debug("Acquired lock for recv (no wait).")
try:
await self._receive(timeout=timeout)
except TimeoutError:
logger.debug("Receive call timed out.")
return
else:
logger.debug("Receive call completed.")
else:
try:
yield queue.get_nowait()
except asyncio.QueueEmpty:
logger.debug("Subscription queue empty.")
return

async def unsubscribe(self, sub_id: str) -> bool:
Expand Down

0 comments on commit 59f9250

Please sign in to comment.