kacpermuda commented on code in PR #77024:
URL: https://github.com/apache/airflow/pull/77024#discussion_r4642498009
##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -904,7 +904,13 @@ def handle_events(self):
def on_trigger_event(self, trigger_id: int, event: TriggerEvent) -> None:
"""Record that a trigger fired an event."""
- Trigger.submit_event(trigger_id=trigger_id, event=event)
+ callbacks: list[Callable[[], None]] = []
+ with create_session() as session:
Review Comment:
You’re right, `submit_event` is already `@provide_session`, which commits on
exit, so running the callbacks after it returns is enough. Dropped the explicit
session.
--
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]