Move schemas between compute and controller subpackages

This commit is contained in:
grossmj committed 2021-04-15 18:12:08 +09:30
1 parent c59fc375f2
commit 9c850e0f2b
57 files changed
+332 -214

No files matched your search

+8
View File
@@ -33,6 +33,10 @@ log = logging.getLogger(__name__)
def create_startup_handler(app: FastAPI) -> Callable:
"""
Tasks to be performed when the server is starting.
"""
async def start_app() -> None:
loop = asyncio.get_event_loop()
logger = logging.getLogger("asyncio")
@@ -77,6 +81,10 @@ def create_startup_handler(app: FastAPI) -> Callable:
def create_shutdown_handler(app: FastAPI) -> Callable:
"""
Tasks to be performed when the server is shutdown.
"""
async def shutdown_handler() -> None:
await HTTPClient.close_session()
await Controller.instance().stop()