提交 f7535240 编写于 作者: Y youyong205

remove unused code

上级 5cecc241
......@@ -21,7 +21,7 @@ public class AlertInfo implements Initializable {
protected MetricConfigManager m_manager;
public void addAlertInfo(MetricItemConfig config, long value) {
m_alertInfos.putIfAbsent(config, value);
m_alertInfos.put(config, value);
}
public List<MetricItemConfig> queryLastestAlarmInfo(int minute) {
......
......@@ -181,9 +181,8 @@ public class MetricAlert extends BaseAlert implements Task, LogEnabled {
}
if (alert != null && alert.getKey()) {
config.setId(m_metricConfigManager.buildMetricKey(config.getDomain(), config.getType(), config.getMetricKey()));
m_alertInfo.addAlertInfo(config, new Date().getTime());
sendAlertInfo(productLine, config, alert.getValue());
}
}
......
......@@ -123,7 +123,6 @@ public class SwitchAlert extends BaseAlert implements Task, LogEnabled {
}
if (alert != null && alert.getKey()) {
config.setId(m_metricConfigManager.buildMetricKey(config.getDomain(), config.getType(), config.getMetricKey()));
m_alertInfo.addAlertInfo(config, new Date().getTime());
sendAlertInfo(productLine, config, alert.getValue());
}
......
......@@ -416,6 +416,7 @@ public class Handler implements PageHandler<Context> {
if (!StringUtil.isEmpty(domain) && !StringUtil.isEmpty(type) && !StringUtil.isEmpty(metricKey)) {
config.setId(m_metricConfigManager.buildMetricKey(domain, type, metricKey));
return m_metricConfigManager.insertMetricItemConfig(config);
} else {
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册