potiuk commented on code in PR #52860:
URL: https://github.com/apache/airflow/pull/52860#discussion_r2185070608


##########
airflow-core/src/airflow/cli/commands/api_server_command.py:
##########
@@ -40,6 +40,40 @@
 # more info here: 
https://github.com/benoitc/gunicorn/issues/1877#issuecomment-1911136399
 
 
+def _run_api_server(
+    args, apps: str, access_logfile: str, num_workers: int, worker_timeout: 
int, proxy_headers: bool
+):
+    """Run the API server."""
+    log.info(
+        textwrap.dedent(
+            f"""\
+            Running the uvicorn with:
+            Apps: {apps}
+            Workers: {num_workers}
+            Host: {args.host}:{args.port}
+            Timeout: {worker_timeout}
+            Logfiles: {access_logfile}
+            
================================================================="""
+        )
+    )
+    # get ssl cert and key filepaths here instead of passing them as arguments 
to reduce the number of arguments
+    ssl_cert, ssl_key = _get_ssl_cert_and_key_filepaths(args)
+
+    setproctitle(f"airflow api_server -- host:{args.host} port:{args.port}")
+    uvicorn.run(
+        "airflow.api_fastapi.main:app",
+        host=args.host,
+        port=args.port,
+        workers=num_workers,
+        timeout_keep_alive=worker_timeout,
+        timeout_graceful_shutdown=worker_timeout,
+        ssl_keyfile=ssl_key,
+        ssl_certfile=ssl_cert,
+        access_log=access_logfile,  # type: ignore[arg-type]

Review Comment:
   Hm. But thos was supposed to be "string" -> path to the file  ? 
   
   Can we bring it back to have the same semantics? I.e. if "file_path" - log 
to that path, but if "-" log to stdout?



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