mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Move schemas between compute and controller subpackages
This commit is contained in:
1 parent
c59fc375f2
commit
9c850e0f2b
57 files changed
+332
-214
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user