Skip to content

Commit 668aacd

Browse files
committed
Add explanation for max_count-guarding
1 parent 6a27be7 commit 668aacd

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
@@ -893,6 +893,8 @@ def _logs_missing(self, from_timestamp: datetime) -> list[int] | None:
893893
return None
894894

895895
# Collect any missing address in current range, within MAX_LOG_HOURS timeframe
896+
# The max_count-guarding has been added for when an outdated logrecord is present in the cache,
897+
# this will result in the unwanted collection of missing logs outside the MAX_LOG_HOURS timeframe
896898
address = last_address
897899
slot = last_slot
898900
count = 0

0 commit comments

Comments
 (0)