pierrejeambrun commented on code in PR #52581:
URL: https://github.com/apache/airflow/pull/52581#discussion_r2179941461
##########
airflow-core/src/airflow/utils/serve_logs.py:
##########
@@ -188,8 +209,13 @@ def serve_logs(port=None):
else:
bind_option = GunicornOption("bind", f"0.0.0.0:{port}")
- options = [bind_option, GunicornOption("workers", 2)]
- StandaloneGunicornApplication(wsgi_app, options).run()
+ # Use Uvicorn worker class for ASGI applications
+ options = [
+ bind_option,
+ GunicornOption("workers", 2),
+ GunicornOption("worker_class", "uvicorn.workers.UvicornWorker"),
+ ]
+ StandaloneGunicornApplication(asgi_app, options).run()
Review Comment:
yes uvicorn is the more modern way to run a fastapi app. As long as FastAPI
is installed uvicorn should be available.
Indeed `StandaloneGunicornApplication` seems a little bit outdated if we go
with FastAPI for the log server.
--
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]