mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Use explicit reference to app object for server.
I have no idea why the docs think strings are better. pyinstaller wasn't able to detect the import through the string so the code ended up being stripped from the package. Use an explicit import to prevent that.
This commit is contained in:
parent
21f7912458
commit
4f73c47dcb
@ -6,6 +6,7 @@ from threading import Thread
|
||||
import uvicorn
|
||||
from uvicorn import Config
|
||||
|
||||
from game.server.app import app
|
||||
from game.server.settings import ServerSettings
|
||||
|
||||
|
||||
@ -13,7 +14,7 @@ class Server(uvicorn.Server):
|
||||
def __init__(self) -> None:
|
||||
super().__init__(
|
||||
Config(
|
||||
"game.server.app:app",
|
||||
app=app,
|
||||
host=ServerSettings.get().server_bind_address,
|
||||
port=ServerSettings.get().server_port,
|
||||
log_level="info",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user