dstandish commented on code in PR #40867:
URL: https://github.com/apache/airflow/pull/40867#discussion_r1684533304
##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -1066,6 +1068,14 @@ def _run_scheduler_loop(self) -> None:
num_finished_events += self._process_executor_events(
executor=executor, session=session
)
+
+ for executor in self.job.executors:
+ try:
+ with create_session() as session:
+
self._process_task_event_logs(executor._task_event_logs, session)
Review Comment:
good question. look above, on line 1055. see it is created there? so i
assume it is no different here, and should not be a problem.
the reason to do it, in my view, is that there i want to not let any errors
in "inserting logs" take down the scheduler. the create_session decorator has
try / commit / execpt /rollback logic so it should restore things to a good
state if there's any problem.
with that explanation, what do you think?
--
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]