dstandish commented on code in PR #31987:
URL: https://github.com/apache/airflow/pull/31987#discussion_r1282293970


##########
airflow/jobs/triggerer_job_runner.py:
##########
@@ -609,6 +609,7 @@ async def run_trigger(self, trigger_id, trigger):
                 self.log.info("Trigger %s fired: %s", 
self.triggers[trigger_id]["name"], event)
                 self.triggers[trigger_id]["events"] += 1
                 self.events.append((trigger_id, event))
+                break

Review Comment:
   I can imagine at least in principle it being desirable to yield event before 
doing some cleanup work in the trigger itself.  But ...  shortly after the 
trigger yields first event, it will be unassigned from the task and then 
shortly after that it will be canceled and it will simply stop running.  So 
it's probably not a good idea for a trigger to be designed to do anything after 
the first event, as it will always be subject to a race condition.



-- 
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]

Reply via email to