mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-17 06:48:18 +00:00
Start / Stop / Suspend marche
This commit is contained in:
@ -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