robertwb commented on a change in pull request #11365: [BEAM-9735] Adding 
Always trigger and using it in Reshuffle
URL: https://github.com/apache/beam/pull/11365#discussion_r406952462
 
 

 ##########
 File path: sdks/python/apache_beam/transforms/trigger.py
 ##########
 @@ -367,6 +367,47 @@ def has_ontime_pane(self):
     return False
 
 
+class Always(TriggerFn):
+  """Repeatedly invoke the given trigger, never finishing."""
+  def __init__(self):
+    pass
+
+  def __repr__(self):
+    return 'Always'
+
+  def __eq__(self, other):
+    return type(self) == type(other)
+
+  def __hash__(self):
+    return 1
 
 Review comment:
   More conventional is to return hash(type(self)), to avoid collisions, but 
this is OK. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to