mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Start / Stop / Suspend marche
This commit is contained in:
3 files changed
+23
-14
No files matched your search
@@ -243,12 +243,12 @@ class Route(object):
|
||||
if vm_id is None:
|
||||
vm_id = request.match_info["device_id"]
|
||||
|
||||
if "controller" in request.path:
|
||||
type = "controller"
|
||||
else:
|
||||
if "hypervisor" in request.path:
|
||||
type = "compute"
|
||||
else:
|
||||
type = "controller"
|
||||
lock_key = "{}:{}:{}".format(type, request.match_info["project_id"], vm_id)
|
||||
|
||||
print(lock_key)
|
||||
cls._vm_locks.setdefault(lock_key, {"lock": asyncio.Lock(), "concurrency": 0})
|
||||
cls._vm_locks[lock_key]["concurrency"] += 1
|
||||
|
||||
|
||||
Reference in new issue
Block a user