...
|
...
|
@@ -5,6 +5,7 @@ import com.yoho.error.event.SearchEvent; |
|
|
import com.yoho.error.event.SearchLogsEvent;
|
|
|
import com.yoho.search.base.utils.ConvertUtils;
|
|
|
import com.yoho.search.base.utils.EventReportEnum;
|
|
|
import com.yoho.search.consumer.index.fullbuild.TblProductNewIndexBuilder;
|
|
|
import com.yoho.search.consumer.index.increment.AbstractMqListener;
|
|
|
import com.yoho.search.consumer.service.base.TblSortService;
|
|
|
import com.yoho.search.core.es.utils.IgnoreSomeException;
|
...
|
...
|
@@ -30,11 +31,19 @@ public class TblSortMqListener extends AbstractMqListener implements ChannelAwar |
|
|
private static final Logger SEARCH_EVENT_LOG = LoggerFactory.getLogger("SEARCH_EVENT_LOG");
|
|
|
|
|
|
@Autowired
|
|
|
private TblProductNewIndexBuilder tblProductNewIndexBuilder;
|
|
|
|
|
|
@Autowired
|
|
|
private TblSortService tblSortService;
|
|
|
|
|
|
protected ApplicationEventPublisher publisher;
|
|
|
|
|
|
@Override
|
|
|
public void finish(){
|
|
|
tblProductNewIndexBuilder.init();
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
|
|
|
this.publisher = applicationEventPublisher;
|
|
|
}
|
...
|
...
|
@@ -52,6 +61,8 @@ public class TblSortMqListener extends AbstractMqListener implements ChannelAwar |
|
|
EventReportEnum.TBLSORTMQLISTENER_ONMESSAGE.getMoudleName(), "exception", IgnoreSomeException.filterSomeException(e), null));
|
|
|
Thread.sleep(1000);
|
|
|
throw e;
|
|
|
}finally {
|
|
|
finish();
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|