删除无用代码.

pull/12/head
chen.ma 3 years ago
parent 69b755483f
commit 000bf38440

@ -2,7 +2,6 @@ package cn.hippo4j.starter.alarm;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.google.common.cache.Cache; import com.google.common.cache.Cache;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
@ -32,8 +31,6 @@ public class AlarmControlHandler {
// val 无意义 // val 无意义
cache.put(alarmControl.getTypeEnum().name(), IdUtil.simpleUUID()); cache.put(alarmControl.getTypeEnum().name(), IdUtil.simpleUUID());
return true; return true;
} else {
System.out.println(JSON.toJSONString(alarmControl));
} }
} }

@ -28,7 +28,6 @@ public class ThreadPoolAlarmManage {
SEND_MESSAGE_SERVICE = Optional.ofNullable(ApplicationContextHolder.getInstance()) SEND_MESSAGE_SERVICE = Optional.ofNullable(ApplicationContextHolder.getInstance())
.map(each -> each.getBean(MessageAlarmConfig.SEND_MESSAGE_BEAN_NAME, SendMessageService.class)) .map(each -> each.getBean(MessageAlarmConfig.SEND_MESSAGE_BEAN_NAME, SendMessageService.class))
.orElse(null); .orElse(null);
System.out.println();
} }
/** /**
@ -72,9 +71,9 @@ public class ThreadPoolAlarmManage {
boolean isSend = threadPoolAlarm.getIsAlarm() boolean isSend = threadPoolAlarm.getIsAlarm()
&& divide > threadPoolAlarm.getLivenessAlarm() && divide > threadPoolAlarm.getLivenessAlarm()
&& isSendMessage(threadPoolExecutor, MessageTypeEnum.CAPACITY); && isSendMessage(threadPoolExecutor, MessageTypeEnum.LIVENESS);
if (isSend) { if (isSend) {
SEND_MESSAGE_SERVICE.sendAlarmMessage(MessageTypeEnum.CAPACITY, threadPoolExecutor); SEND_MESSAGE_SERVICE.sendAlarmMessage(MessageTypeEnum.LIVENESS, threadPoolExecutor);
} }
} }

Loading…
Cancel
Save