Skip to content

Commit

Permalink
fix condition to delete old table keys (faust-streaming#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
dima-orca authored Jan 6, 2022
1 parent 9805612 commit a0e9a31
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions faust/tables/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,7 @@ async def _del_old_keys(self) -> None:
window = cast(WindowT, self.window)
assert window
for partition, timestamps in self._partition_timestamps.items():
while timestamps and window.stale(
timestamps[0], self._partition_latest_timestamp[partition]
):
while timestamps and window.stale(timestamps[0], time.time()):
timestamp = heappop(timestamps)
keys_to_remove = self._partition_timestamp_keys.pop(
(partition, timestamp), None
Expand Down

0 comments on commit a0e9a31

Please sign in to comment.