| | |
| | | print("L2客户端接受到数据") |
| | | data = json.loads(val) |
| | | if data["data"]["type"] == "l2_cmd": |
| | | # data = data["data"] |
| | | l2CommandManager.process_command(command_manager.CLIENT_TYPE_CMD_L2, None, data) |
| | | except Exception as e: |
| | | logging.exception(e) |
| | |
| | | cpu_percent = psutil.cpu_percent(interval=1) |
| | | fdata["device"] = {"cpu": cpu_percent, "memery": memory_info.percent} |
| | | result = {"code": 0, "data": fdata, "msg": ""} |
| | | print("OnGetEnvInfo 成功") |
| | | self.send_response(result, client_id, request_id) |
| | | except Exception as e: |
| | | self.send_response({"code": 1, "msg": str(e)}, client_id, request_id) |