mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-17 23:08:18 +00:00
Create/update project on compute when variables changes
This commit is contained in:
@ -460,11 +460,12 @@ class Compute:
|
||||
msg = json.loads(response.data)
|
||||
action = msg.pop("action")
|
||||
event = msg.pop("event")
|
||||
|
||||
if action == "ping":
|
||||
self._cpu_usage_percent = event["cpu_usage_percent"]
|
||||
self._memory_usage_percent = event["memory_usage_percent"]
|
||||
self._controller.notification.emit("compute.updated", self.__json__())
|
||||
elif action == 'project.updated':
|
||||
print(event)
|
||||
else:
|
||||
yield from self._controller.notification.dispatch(action, event, compute_id=self.id)
|
||||
if self._ws:
|
||||
|
Reference in New Issue
Block a user