jedcunningham commented on a change in pull request #14085:
URL: https://github.com/apache/airflow/pull/14085#discussion_r590744829



##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -1295,13 +1293,19 @@ def _execute(self) -> None:
                 )
                 models.DAG.deactivate_stale_dags(execute_start_time)
 
-            self.executor.end()
-
             settings.Session.remove()  # type: ignore
         except Exception:  # pylint: disable=broad-except
             self.log.exception("Exception when executing 
SchedulerJob._run_scheduler_loop")
+            raise

Review comment:
       Noticed this was missing too. Without it, the SchedulerJob is always 
successful:
   
   
https://github.com/apache/airflow/blob/923bde2b917099135adfe470a5453f663131fd5f/airflow/jobs/base_job.py#L236-L249




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to