From 033c1304e3921292233989c6abeb2e500046ba8c Mon Sep 17 00:00:00 2001 From: Daniel Standish <15932138+dstandish@users.noreply.github.com> Date: Sun, 1 Sep 2024 05:35:46 -0700 Subject: [PATCH] Add backcompat check for executors that don't inherit BaseExecutor (#41906) (cherry picked from commit f168d0aedbc73b86b1bb0e7fb38cad4ce5a66621) --- airflow/jobs/scheduler_job_runner.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airflow/jobs/scheduler_job_runner.py b/airflow/jobs/scheduler_job_runner.py index ba5f90c68b77..69789e9df9cc 100644 --- a/airflow/jobs/scheduler_job_runner.py +++ b/airflow/jobs/scheduler_job_runner.py @@ -1135,6 +1135,9 @@ def _run_scheduler_loop(self) -> None: for executor in self.job.executors: try: + # this is backcompat check if executor does not inherit from BaseExecutor + if not hasattr(executor, "_task_event_logs"): + continue with create_session() as session: self._process_task_event_logs(executor._task_event_logs, session) except Exception: