Skip to content

Commit 2b2c0e2

Browse files
committed
Add explanation for max_count-guarding
1 parent aa35356 commit 2b2c0e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,8 @@ def _logs_missing(self, from_timestamp: datetime) -> list[int] | None: # noqa:
890890
return None
891891

892892
# Collect any missing address in current range, within MAX_LOG_HOURS timeframe
893+
# The max_count-guarding has been added for when an outdated logrecord is present in the cache,
894+
# this will result in the unwanted collection of missing logs outside the MAX_LOG_HOURS timeframe
893895
address = last_address
894896
slot = last_slot
895897
count = 0

0 commit comments

Comments
 (0)