Skip to content

Commit

Permalink
Set default process manager for base ASGI app
Browse files Browse the repository at this point in the history
5e6af54

5e6af54 added a check for the `PROCESS_MANAGER` environment variable in
inboard/app/base/main.py, but no default was set. This commit will set
Gunicorn as the default process manager, to avoid errors if
`PROCESS_MANAGER` is not set.
  • Loading branch information
br3ndonland committed Sep 20, 2020
1 parent 2567156 commit 9d51de4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inboard/app/base/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def __call__(
}
)
version = f"{sys.version_info.major}.{sys.version_info.minor}"
process_manager = os.getenv("PROCESS_MANAGER")
process_manager = os.getenv("PROCESS_MANAGER", "gunicorn")
if process_manager not in ["gunicorn", "uvicorn"]:
raise NameError("Process manager needs to be either uvicorn or gunicorn.")
server = "Uvicorn" if process_manager == "uvicorn" else "Uvicorn, Gunicorn,"
Expand Down

0 comments on commit 9d51de4

Please sign in to comment.