Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

minhyeoky
Copy link
Contributor

@minhyeoky minhyeoky commented Nov 18, 2024

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.

  • New feature (a non-breaking change that adds functionality)
  • This change requires a documentation update

Checklist

  • My code adheres to the style guidelines of this project (scripts/lint.sh shows no errors)
  • I have conducted a self-review of my own code
  • I have made the necessary changes to the documentation
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my new feature
  • Both new and existing unit tests pass successfully on my local environment by running scripts/test-cov.sh
  • I have ensured that static analysis tests are passing by running scripts/static-analysis.sh
  • I have included code examples to illustrate the modifications

@Lancetnik Lancetnik enabled auto-merge November 19, 2024 14:00
@Lancetnik
Copy link
Member

Thank you a lot for the improvement!

@Lancetnik Lancetnik added this pull request to the merge queue Nov 19, 2024
Merged via the queue into airtai:main with commit fd30bfc Nov 19, 2024
32 checks passed
@minhyeoky minhyeoky deleted the uvicorn+fd branch November 20, 2024 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants