。。。

This commit is contained in:
wangliwen 2022-08-26 11:27:37 +08:00
parent 1f6438086c
commit 5727a36b3f
1 changed files with 6 additions and 7 deletions

View File

@ -1275,14 +1275,13 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
customThreadPool.shutdown();
}, executor));
if (maxPage.get() == 100) {
try {
Thread.sleep(new Random().nextInt(100)); // 防止任务运行过快无法跳出循环
} catch (InterruptedException e) {
logger.info("知识库同步异常", e);
}
}
try {
Thread.sleep(100); // 防止任务运行过快无法跳出循环
} catch (InterruptedException e) {
logger.info("知识库同步异常", e);
}
} while (end.get() || pageIndex.get() < maxPage.get());
return task;
}).collect(Collectors.toList());