generated from br3ndonland/template-python
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve separation of Uvicorn and Gunicorn servers
- Make `process_manager` a required argument for `start.start_server()` - Only set Gunicorn conf path when running Gunicorn All unit tests pass, but when running Uvicorn, tests don't finish until a manual keyboard interrupt is passed (`^C`). A context manager may be needed to only run the server for a specified time. ```text pytest ....................^C.^C.^C..........x......... [100%] 41 passed, 1 xfailed in 7.18s pytest tests/test_start.py::TestStartServer::test_start_server_uvicorn \ -vv ========================= test session starts ========================= platform darwin -- Python 3.8.5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 -- /Users/brendon/dev/inboard/.venv/bin/python3 cachedir: .pytest_cache rootdir: /Users/brendon/dev/inboard, configfile: pyproject.toml plugins: mock-3.3.1 collected 3 items tests/test_start.py::TestStartServer::test_start_server_uvicorn[inboard .app.base.main:app] ^CPASSED [ 33%] tests/test_start.py::TestStartServer::test_start_server_uvicorn[inboard .app.fastapibase.main:app] ^CPASSED [ 66%] tests/test_start.py::TestStartServer::test_start_server_uvicorn[inboard .app.starlettebase.main:app] ^CPASSED [100%] ========================== 3 passed in 9.96s ========================== ```
- Loading branch information
1 parent
1c6a7ec
commit 735618a
Showing
2 changed files
with
16 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters