Add runtime checking to create_server to verify that startup has been run (#2328)

This commit is contained in:
Adam Hopkins
2021-12-13 09:36:41 +02:00
committed by GitHub
parent 3d383d7b97
commit 264453459e
5 changed files with 104 additions and 62 deletions

View File

@@ -42,6 +42,7 @@ class ApplicationState:
reload_dirs: Set[Path] = field(default_factory=set)
server: Server = field(default=Server.SANIC)
is_running: bool = field(default=False)
is_started: bool = field(default=False)
is_stopping: bool = field(default=False)
verbosity: int = field(default=0)
workers: int = field(default=0)