You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/10 13:32:40 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #18092: Graceful scheduler shutdown on error

potiuk commented on a change in pull request #18092:
URL: https://github.com/apache/airflow/pull/18092#discussion_r706184852



##########
File path: airflow/cli/commands/scheduler_command.py
##########
@@ -38,11 +38,24 @@ def _create_scheduler_job(args):
     return job
 
 
+def _run_scheduler_job(args, is_daemon):
+    skip_serve_logs = args.skip_serve_logs
+    job = _create_scheduler_job(args)
+    if not is_daemon:
+        signal.signal(signal.SIGINT, sigint_handler)

Review comment:
       NIT: can we move the signal handling out to the "else"  in "scheduler()" ? seems that the handlers can be set before entering `_run_scheduler_job` and this way we will be able to remove `is_daemon` param,




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org