Authored by jack

增加默认阈值200

... ... @@ -56,6 +56,7 @@ public class RabbitScanTask implements Runnable {
}
}
synchronized (InterVar.LOCK.intern()) {
for (MObjectInfo info : mObjectInfoList) {
... ...
... ... @@ -81,6 +81,8 @@ public class QueueViewJob implements Callable {
//fire alarm
for (QueueInfo queueInfo : oneView.getQueueView()) {
initQueueAlert(Integer.toString(moId), queueInfo);
updateQueueAlert(Integer.toString(moId), queueInfo);
checkAlert(Integer.toString(moId), queueInfo);
... ... @@ -150,6 +152,22 @@ public class QueueViewJob implements Callable {
}
//初始化
private void initQueueAlert(String moId, QueueInfo queueInfo)
{
RabbitAlertInfo alertInfo=new RabbitAlertInfo();
alertInfo.setAlertHigh(200);
alertInfo.setMoId(Integer.valueOf(moId));
alertInfo.setQueueName(queueInfo.getName());
if (null == rabbitAlertMapper.queryAlertInfo(alertInfo)) {
rabbitAlertMapper.insertAlertInfo(alertInfo);
}
}
@Override
public Object call() throws Exception {
doTask();
... ... @@ -198,4 +216,6 @@ public class QueueViewJob implements Callable {
}
});
}
}
... ...