Skip to content

Commit 70bc4a0

Browse files
committed
Add comment about queue rate limiting
1 parent 97cad7b commit 70bc4a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugwise_usb/connection/queue.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ async def _send_queue_worker(self) -> None:
198198
)
199199
_LOGGER.warning("Queue contents: %s", self._submit_queue._queue)
200200
_LOGGER.warning("Requests dropped: %d", self._submit_queue.dropped_msgs)
201+
# When the queue size grows, rate-limit the sending of requests to avoid overloading the network
201202
await sleep(0.125)
202203

203204
await self._stick.write_to_stick(request)

0 commit comments

Comments
 (0)