Authored by Gino Zhang

增加两个告警的枚举

... ... @@ -45,9 +45,9 @@ public class EsWordDefMqListener extends AbstractMqListener implements ChannelAw
updateData(json.getObject("data", Map.class));
}
} catch (Exception e) {
publisher.publishEvent(new SearchEvent(EventReportEnum.STYLEMQLISTENER_ONMESSAGE.getEventName(),
EventReportEnum.STYLEMQLISTENER_ONMESSAGE.getFunctionName(),
EventReportEnum.STYLEMQLISTENER_ONMESSAGE.getMoudleName(), "exception", IgnoreSomeException.filterSomeException(e), null));
publisher.publishEvent(new SearchEvent(EventReportEnum.ESWORDDEF_MQLISTENER_ONMESSAGE.getEventName(),
EventReportEnum.ESWORDDEF_MQLISTENER_ONMESSAGE.getFunctionName(),
EventReportEnum.ESWORDDEF_MQLISTENER_ONMESSAGE.getMoudleName(), "exception", IgnoreSomeException.filterSomeException(e), null));
Thread.sleep(1000);
throw e;
}
... ...
... ... @@ -2,10 +2,13 @@ package com.yoho.search.consumer.index.increment;
import com.alibaba.fastjson.JSONObject;
import com.rabbitmq.client.Channel;
import com.yoho.error.event.SearchEvent;
import com.yoho.search.base.utils.ConvertUtils;
import com.yoho.search.base.utils.EventReportEnum;
import com.yoho.search.base.utils.ISearchConstants;
import com.yoho.search.consumer.index.common.IYohoIndexService;
import com.yoho.search.consumer.service.base.RobotQuestionService;
import com.yoho.search.core.es.utils.IgnoreSomeException;
import com.yoho.search.dal.model.RobotQuestion;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
... ... @@ -47,9 +50,9 @@ public class RobotQuestionMqListener extends AbstractMqListener implements Chann
updateData(json.getObject("data", Map.class), indexName, idField);
}
} catch (Exception e) {
// publisher.publishEvent(new SearchEvent(EventReportEnum.RobotQuestionMQLISTENER_ONMESSAGE.getEventName(),
// EventReportEnum.RobotQuestionMQLISTENER_ONMESSAGE.getFunctionName(),
// EventReportEnum.RobotQuestionMQLISTENER_ONMESSAGE.getMoudleName(),"exception", IgnoreSomeException.filterSomeException(e),null));e
publisher.publishEvent(new SearchEvent(EventReportEnum.ROBOTQUESTION_MQLISTENER_ONMESSAGE.getEventName(),
EventReportEnum.ROBOTQUESTION_MQLISTENER_ONMESSAGE.getFunctionName(),
EventReportEnum.ROBOTQUESTION_MQLISTENER_ONMESSAGE.getMoudleName(),"exception", IgnoreSomeException.filterSomeException(e),null));
Thread.sleep(1000);
throw e;
}
... ...