You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2023/08/02 19:22:33 UTC

[GitHub] [airflow] hussein-awala commented on a diff in pull request #31987: Load just the first yielded event in the triggerer

hussein-awala commented on code in PR #31987:
URL: https://github.com/apache/airflow/pull/31987#discussion_r1282324677


##########
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:
   > Won't this result in trigger.cleanup() being called before the trigger finishes though?
   
   Yes, it will be possible, and there won't be any issues with it. Even if the trigger fails because of executing the cleanup process (for ex: deleting some resources used the run method), the triggerer job will ignore the failure and proceed to process only the first yielded event.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org