|
@@ -1052,7 +1052,7 @@ public class XxlJobService {
|
|
|
}
|
|
|
List<Content> contentList;
|
|
|
// 每天晚上随机全量同步
|
|
|
- boolean findAll = hour > 18 && Math.random() > 0.5;
|
|
|
+ boolean findAll = hour > 18;
|
|
|
if (findAll) {
|
|
|
contentList = aigcWaitingPublishContentService.getAllContent(account.getPlanId(), account.getAccountId(), null);
|
|
|
} else {
|
|
@@ -1081,7 +1081,7 @@ public class XxlJobService {
|
|
|
List<String> planIds = planList.stream().map(PublishPlan::getId).collect(Collectors.toList());
|
|
|
List<PublishPlanAccountDTO> accountList = publishContentMapper.getPublishPlanAccounts(planIds);
|
|
|
Collections.shuffle(accountList);
|
|
|
- CountDownLatch cdl = new CountDownLatch(accountList.size());
|
|
|
+ CountDownLatch cdl = new CountDownLatch(syncPublishContentBatchJobSize);
|
|
|
ExecutorService thread = new CommonThreadPoolExecutor(
|
|
|
syncPublishContentThreadPoolSize, syncPublishContentThreadPoolSize, 0L, TimeUnit.SECONDS,
|
|
|
new LinkedBlockingQueue<>(),
|
|
@@ -1137,8 +1137,6 @@ public class XxlJobService {
|
|
|
}
|
|
|
List<PublishContentGzhWaiting> existList = publishContentGzhWaitingRepository.getByIdIn(contentIds);
|
|
|
List<String> existContentIds = existList.stream().map(PublishContentGzhWaiting::getId).collect(Collectors.toList());
|
|
|
- Map<String, PublishContentGzhWaiting> existMap = existList.stream().collect(
|
|
|
- Collectors.toMap(PublishContentGzhWaiting::getId, Function.identity()));
|
|
|
List<PublishContentGzhWaiting> saveList = new ArrayList<>();
|
|
|
for (Content content : contentList) {
|
|
|
// 已存在跳过
|