pabloem commented on code in PR #23100:
URL: https://github.com/apache/beam/pull/23100#discussion_r966396589
##########
sdks/python/apache_beam/transforms/trigger.py:
##########
@@ -385,8 +388,10 @@ def __repr__(self):
return 'AfterProcessingTime(delay=%d)' % self.delay
def on_element(self, element, window, context):
- context.set_timer(
- '', TimeDomain.REAL_TIME, context.get_current_time() + self.delay)
+ context.add_state(self.COUNT_TAG, 1)
+ if context.get_state(self.COUNT_TAG) == 1:
Review Comment:
Would this be the correct check?
```suggestion
if context.get_state(self.COUNT_TAG) >= 1:
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]