mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Clean GNS3 close if one remote server is down. Fixes #1357.
This commit is contained in:
1 parent
e3c8c9d484
commit
a54359d243
3 files changed
+22
-12
No files matched your search
@@ -481,6 +481,18 @@ class Controller:
|
||||
if compute in project.computes:
|
||||
yield from project.close()
|
||||
|
||||
def compute_has_open_project(self, compute):
|
||||
"""
|
||||
Check is compute has a project opened.
|
||||
|
||||
:returns: True if a project is open
|
||||
"""
|
||||
|
||||
for project in self._projects.values():
|
||||
if compute in project.computes and project.status == "opened":
|
||||
return True
|
||||
return False
|
||||
|
||||
@asyncio.coroutine
|
||||
def delete_compute(self, compute_id):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user