mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Close and remove projects deleted from disks after SIGHUP signal is received.
This commit is contained in:
parent
5244ae6d4c
commit
6c3a070733
@ -145,6 +145,14 @@ class Controller:
|
||||
|
||||
log.info("Controller is reloading")
|
||||
self._load_controller_settings()
|
||||
|
||||
# remove all projects deleted from disk.
|
||||
for project in self._projects.copy().values():
|
||||
if not os.path.exists(project.path):
|
||||
log.info(f"Project '{project.name}' doesn't exist on the disk anymore, closing...")
|
||||
await project.close()
|
||||
self.remove_project(project)
|
||||
|
||||
await self.load_projects()
|
||||
|
||||
def check_can_write_config(self):
|
||||
|
Loading…
Reference in New Issue
Block a user