mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-18 20:37:57 +00:00
Fix project auto open feature. Fixes #2455
This commit is contained in:
parent
0dd53d3178
commit
648ae231ef
@ -134,7 +134,9 @@ class Controller:
|
|||||||
log.warning(str(e))
|
log.warning(str(e))
|
||||||
|
|
||||||
await self.load_projects()
|
await self.load_projects()
|
||||||
await self._project_auto_open()
|
|
||||||
|
# start to auto open projects (if configured) 5 seconds after the controller has started
|
||||||
|
asyncio.get_event_loop().call_later(5, asyncio.create_task, self._project_auto_open())
|
||||||
|
|
||||||
def _create_ssl_context(self, server_config):
|
def _create_ssl_context(self, server_config):
|
||||||
|
|
||||||
@ -595,9 +597,12 @@ class Controller:
|
|||||||
Auto open the project with auto open enable
|
Auto open the project with auto open enable
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for project in self._projects.values():
|
try:
|
||||||
if project.auto_open:
|
for project in self._projects.values():
|
||||||
await project.open()
|
if project.auto_open:
|
||||||
|
await project.open()
|
||||||
|
except ControllerError as e:
|
||||||
|
log.error(f"Could not auto open projects: {e}")
|
||||||
|
|
||||||
def get_free_project_name(self, base_name):
|
def get_free_project_name(self, base_name):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user