Authored by qinchao

优化代码

... ... @@ -70,6 +70,9 @@ public class NodePm2Task {
logger.info("cron_task_node_mem for ip {} ,name {} ",ip,pythonEnv.getName());
String result = httpRestClientService.doGet("http://" + ip + ":9615", null);
if(result==null){
continue;
}
JSONObject resultJSONObject = JSON.parseObject(result);
JSONObject monit = resultJSONObject.getJSONObject("monit");
long freeMem = monit.getLongValue("free_mem")/(1024 * 1024);
... ...