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/06/09 19:52:48 UTC

[GitHub] [airflow] hussein-awala commented on pull request #31703: Remove return statement after yield from triggers class

hussein-awala commented on PR #31703:
URL: https://github.com/apache/airflow/pull/31703#issuecomment-1585060458

   I am not an expert in async methods in Python, but as far as I know, the method continues execution when it yields something (it's a generator).
   
   In our case, the trigger is interrupted by Airflow when Airflow calls the `execute_complete` method. However, between the moment the `TriggerEvent` is yielded and the moment the trigger is stopped, it continues execution and may yield additional `TriggerEvents` that are not processed.
   
   This is just a personal hypothesis that could potentially explain the issue #31795, which I believe might be resolved by merging #31803. However, if this is indeed the case, it is important to note that some return statements are necessary to stop the trigger immediately after yielding a `TriggerEvent`.
   
   WDYT?


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