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(async): add uvicorn, asgi, upgrade django=4.1 #473

Merged
merged 13 commits into from
Nov 27, 2023
Merged

Conversation

sun337
Copy link
Contributor

@sun337 sun337 commented Mar 17, 2023

Why was this change necessary?

Current version of django(3.2) doesn't support async tasks.

How does it address the problem?

After upgrading to django>4.1 and running asgi server, the application can run tasks asynchronously.

Are there any side effects?

Uvicorn config --limit-concurrency is not yet supported when running with Gunicorn.

Need to test provisioner scripts before merging

@sun337 sun337 linked an issue Mar 29, 2023 that may be closed by this pull request
@sun337 sun337 requested a review from sahithchandan April 10, 2023 09:57
@sun337 sun337 marked this pull request as ready for review April 10, 2023 10:00
@sun337 sun337 requested a review from CuriousLearner April 12, 2023 09:55
@CuriousLearner
Copy link
Contributor

You may also take a look at this: https://github.com/Fueled/beacon-backend/commit/8f603d8c26cb81ec5454cb5e0aae3e00917665f5#diff-9cc070b76f0e6b43857f4eeedb4eaa88a711fc9e80a5bcad1a7679489cadc6bdR63-R70

and checkout that the nginx settings are in place for uvicorn proxy pass.

@CuriousLearner
Copy link
Contributor

Also, the docs changes can be picked up from here: https://github.com/Fueled/beacon-backend/commit/e3d7d01b85460ffa49962e3ff325b33ae1fc0fe0

@sun337 sun337 marked this pull request as draft April 13, 2023 14:22
@theskumar
Copy link
Member

@sun337 Are you still working on it?

@what-the-diff
Copy link

what-the-diff bot commented Apr 25, 2023

PR Summary

  • Added support for Django 4.1
    Upgraded to the latest Django version with added features and improvements
  • Switched from WSGI to ASGI in the project
    Transitioned to ASGI for improved concurrency handling and better performance
  • Updated docker-compose files and adjusted project requirements
    Reflected Django version upgrade in docker configurations and removed the now unnecessary Gunicorn dependency since it's included by default in Django 4+ versions

@sun337
Copy link
Contributor Author

sun337 commented Apr 27, 2023

@sun337 Are you still working on it?

@theskumar
The provisioner scripts aren't tested yet. Also I'm thinking to update python to 3.11 in the same PR, thoughts?

@CuriousLearner
Copy link
Contributor

The only thing (and the most critical one) needs to be tested with upgraded Python version is that the uwsgi plugin that is compiled through ansible on configuration task works.

I don't think it should have any other impact.

@sun337 sun337 marked this pull request as ready for review May 17, 2023 12:22
@CuriousLearner
Copy link
Contributor

Hey @sun337

When you've time, can you pick this up and test to see if this is working fine?

@sun337 sun337 merged commit d305b93 into main Nov 27, 2023
3 checks passed
@sun337 sun337 deleted the async-support branch November 27, 2023 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Async Django Support
3 participants