ashb commented on a change in pull request #15070:
URL: https://github.com/apache/airflow/pull/15070#discussion_r604076313
##########
File path: airflow/cli/commands/scheduler_command.py
##########
@@ -60,4 +69,17 @@ def scheduler(args):
signal.signal(signal.SIGINT, sigint_handler)
signal.signal(signal.SIGTERM, sigint_handler)
signal.signal(signal.SIGQUIT, sigquit_handler)
+ if is_local_executor:
+ sub_proc = _serve_logs(skip_serve_logs)
job.run()
+ if sub_proc:
+ sub_proc.terminate()
+
+
+def _serve_logs(skip_serve_logs: bool = False) -> Optional[Process]:
Review comment:
I know you coped this from the celery worker fn, but this is odd having
the condition inside and passing `skip_server_logs` to it, rather than doing
`if is_local_executor and not skip_serve_logs:` outside.
--
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]