mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-20 16:20:18 +00:00
Option to disable image discovery and do not scan parent directory
This commit is contained in:
@ -21,6 +21,7 @@ from typing import Callable
|
||||
from fastapi import FastAPI
|
||||
|
||||
from gns3server.controller import Controller
|
||||
from gns3server.config import Config
|
||||
from gns3server.compute import MODULES
|
||||
from gns3server.compute.port_manager import PortManager
|
||||
from gns3server.utils.http_client import HTTPClient
|
||||
@ -60,9 +61,10 @@ def create_startup_handler(app: FastAPI) -> Callable:
|
||||
# computing with server start
|
||||
from gns3server.compute.qemu import Qemu
|
||||
|
||||
# Start the discovering new images on file system 5 seconds after the server has started
|
||||
# to give it a chance to process API requests
|
||||
loop.call_later(5, asyncio.create_task, discover_images_on_filesystem(app))
|
||||
if Config.instance().settings.Server.auto_discover_images is True:
|
||||
# Start the discovering new images on file system 5 seconds after the server has started
|
||||
# to give it a chance to process API requests
|
||||
loop.call_later(5, asyncio.create_task, discover_images_on_filesystem(app))
|
||||
|
||||
for module in MODULES:
|
||||
log.debug(f"Loading module {module.__name__}")
|
||||
|
Reference in New Issue
Block a user