mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Refactor tests and start work on database integration.
This commit is contained in:
1 parent
ae55c0ec9c
commit
bf7cf862af
69 files changed
+2955
-1877
No files matched your search
@@ -25,7 +25,8 @@ from gns3server.controller import Controller
|
||||
from gns3server.compute import MODULES
|
||||
from gns3server.compute.port_manager import PortManager
|
||||
from gns3server.utils.http_client import HTTPClient
|
||||
#from gns3server.db.tasks import connect_to_db, close_db_connection
|
||||
from gns3server.db.tasks import connect_to_db
|
||||
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -54,7 +55,7 @@ def create_startup_handler(app: FastAPI) -> Callable:
|
||||
loop.set_debug(True)
|
||||
|
||||
# connect to the database
|
||||
# await connect_to_db(app)
|
||||
await connect_to_db()
|
||||
|
||||
await Controller.instance().start()
|
||||
# Because with a large image collection
|
||||
@@ -89,7 +90,4 @@ def create_shutdown_handler(app: FastAPI) -> Callable:
|
||||
if PortManager.instance().udp_ports:
|
||||
log.warning("UDP ports are still used {}".format(PortManager.instance().udp_ports))
|
||||
|
||||
# close the connection to the database
|
||||
# await close_db_connection(app)
|
||||
|
||||
return shutdown_handler
|
||||
Reference in new issue
Block a user