airtai / faststream

FastStream is a powerful and easy-to-use Python framework for building asynchronous services interacting with event streams such as Apache Kafka, RabbitMQ, NATS and Redis.
https://faststream.airt.ai/latest/
Apache License 2.0
3.15k stars 161 forks source link

feat: support running ASGI app with Uvicorn using file descriptor #1923

Closed minhyeoky closed 3 days ago

minhyeoky commented 4 days ago

Description

It is common to use a process manager like Supervisor. In such cases, we typically pass a file descriptor instead of binding to a host and port directly. Currently, it is possible to pass the value to Uvicorn.Config via run_extra_options, but it needs to be cast as an integer.

https://www.uvicorn.org/deployment/#supervisor

faststream run "path-to-app" --fd=0

Type of change

Please delete options that are not relevant.

Checklist

Lancetnik commented 3 days ago

Thank you a lot for the improvement!