Commit de9a9722 authored by KeYong's avatar KeYong

修改bug

parent f39fae66
package com.yeejoin.amos.knowledgebase.face.service;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
......@@ -255,7 +253,7 @@ public class DocAuditService {
List<ConstantCategoryModel> allCategoryModel = new ArrayList<>();
if (!allPublishedDocIds.isEmpty()) {
while (index < size) {
int num = Math.min(index + 50, size);
int num = Math.min(index + 200, size);
List<Long> curDocIds = allPublishedDocIds.subList(index, index + num);
index += num;
List<KnowledgeDocContentModel> docContentModels = docLibraryService.efficientList(curDocIds);
......@@ -275,6 +273,7 @@ public class DocAuditService {
// 推mq消息给规则服务
try {
emqKeeper.getMqttClient().publish(topic, ClazzUtils.serializableObject(definitionModel), RuleConfig.DEFAULT_QOS, false);
logger.info("知识库服务同步文档至规则消息发送成功 ("+ definitionModel +") " + new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date(System.currentTimeMillis())));
} catch (Exception e) {
logger.fatal("同步文档至规则服务出错", e);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment