Skip to content

Commit 0f6b605

Browse files
authored
Fix a bug in streaming OrderedWindowElements. (#36642)
1 parent 471050c commit 0f6b605

File tree

1 file changed

+2
-2
lines changed
  • sdks/python/apache_beam/examples/cookbook/ordered_window_elements

1 file changed

+2
-2
lines changed

sdks/python/apache_beam/examples/cookbook/ordered_window_elements/streaming.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def process(
212212
_LOGGER.info(
213213
"[process] setting initial timer to %s",
214214
first_window_end_ts + self.allowed_lateness)
215-
if (self.stop_timestamp is not None and
215+
if (self.stop_timestamp is None or
216216
first_window_end_ts + self.allowed_lateness < self.stop_timestamp):
217217
window_timer.set(first_window_end_ts + self.allowed_lateness)
218218

@@ -368,7 +368,7 @@ def on_timer(
368368
_LOGGER.info(
369369
"[on_timer] setting follow-up timer to %s",
370370
next_window_end_ts + self.allowed_lateness)
371-
if (self.stop_timestamp is not None and
371+
if (self.stop_timestamp is None or
372372
next_window_end_ts + self.allowed_lateness < self.stop_timestamp):
373373
window_timer.set(next_window_end_ts + self.allowed_lateness)
374374

0 commit comments

Comments
 (0)