Skip to content

Commit cc2ae05

Browse files
committed
Use asyncio.Queue.qsize()
1 parent 22d5139 commit cc2ae05

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugwise_usb/connection/queue.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,10 @@ async def _send_queue_worker(self) -> None:
197197
return
198198

199199
queue_depth = self._stick.queue_depth - self._submit_queue.dropped_msgs
200-
if self._submit_queue.qsize > 3:
201-
_LOGGER.warning("Awaiting responses (qsize) %d", self._submit_queue.qsize)
200+
if self._submit_queue.qsize() > 3:
201+
_LOGGER.warning(
202+
"Awaiting responses (qsize) %d", self._submit_queue.qsize()
203+
)
202204
_LOGGER.warning("Awaiting responses (queu_depth) %d", queue_depth)
203205
_LOGGER.warning("Queue contents: %s", self._submit_queue._queue)
204206
_LOGGER.warning("Requests dropped: %d", self._submit_queue.dropped_msgs)

0 commit comments

Comments
 (0)