InigoSJ commented on code in PR #23100:
URL: https://github.com/apache/beam/pull/23100#discussion_r966428515
##########
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:
I think that would make it the same as before, it would increase the timer
for every element, we only want to increase if it's the first we see.
--
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]