Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-08-26 13:42:55 +08:00
commit 32eb5b2c8c
1 changed files with 5 additions and 6 deletions

View File

@ -1275,12 +1275,11 @@ 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());