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



##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -1292,13 +1290,12 @@ 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")
         finally:
             self.processor_agent.end()

Review comment:
       Good point. I tried exit stack but wasn't able to get it to log any 
exceptions, if any happened, in the end methods. I fell back to try/catch, but 
open to ideas.




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