pankajkoti commented on code in PR #32707:
URL: https://github.com/apache/airflow/pull/32707#discussion_r1270971610


##########
airflow/cli/commands/scheduler_command.py:
##########
@@ -34,12 +35,17 @@
 from airflow.utils.cli import process_subdir, setup_locations, setup_logging, 
sigint_handler, sigquit_handler
 from airflow.utils.scheduler_health import serve_health_check
 
+log = logging.getLogger(__name__)
+
 
 def _run_scheduler_job(job_runner: SchedulerJobRunner, *, skip_serve_logs: 
bool) -> None:
     InternalApiConfig.force_database_direct_access()
     enable_health_check = conf.getboolean("scheduler", "ENABLE_HEALTH_CHECK")
     with _serve_logs(skip_serve_logs), 
_serve_health_check(enable_health_check):
-        run_job(job=job_runner.job, execute_callable=job_runner._execute)
+        try:
+            run_job(job=job_runner.job, execute_callable=job_runner._execute)
+        except Exception:
+            log.exception("Exception when running scheduler job")

Review Comment:
   yes, sorry missed reading the logging level.



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

Reply via email to