-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove Gunicorn #79
base: main
Are you sure you want to change the base?
Remove Gunicorn #79
Conversation
template/pyproject.toml
Outdated
@@ -16,8 +16,8 @@ psycopg = "^3.1.12" | |||
python = "^3.12" | |||
uvicorn = "^0.24.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue If we're relying on this being > 0.30.0, we should update it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦🏼 - Thanks, that was a silly omission. I'm going to bump to the latest revision.
UVICORN_WORKERS="${UVICORN_WORKERS:-4}" | ||
|
||
serve () { | ||
exec uvicorn \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question the gunicorn config was in a config file, should this stay inline or be in a separate config file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell, uvicorn does not support passing config as a file. Which is why I opted to switch back to inline config like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for going back and doing this!
I only have one tiny blocking change - pinning uvicorn higher than 0.30.0
Uvicorn now has process management, so we can use that directly and remove the need for Gunicorn. I also took the opportunity to update the default logging so it pretty closely matches the default logging format used by uvicorn. This prevents the jarring changed when the Django logging is configured.
7c97eef
to
eb0e760
Compare
Uvicorn now has process management, so we can use that directly and remove the need for Gunicorn.
I also took the opportunity to update the default logging so it pretty closely matches the default logging format used by uvicorn. This prevents the jarring changed when the Django logging is configured.
resolves #70