mirror of
https://github.com/dataease/dataease.git
synced 2026-06-16 11:21:44 +08:00
fix(X-Pack): 修复在系统管理中设置了6分钟检测一次数据源,时间间隔到了之后数据同步没有进行数据源状态检测的问题
This commit is contained in:
@@ -1195,6 +1195,7 @@ public class DatasourceServer implements DatasourceApi {
|
||||
}
|
||||
|
||||
|
||||
@XpackInteract(value = "syncDatasourceStatus", before = false)
|
||||
public void updateDatasourceStatus() {
|
||||
Specification<CoreDatasource> findTypeNotInSpec = (root, query, cb) -> {
|
||||
List<Predicate> predicates = new ArrayList<>();
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.dataease.job.schedule;
|
||||
|
||||
|
||||
import io.dataease.datasource.server.DatasourceServer;
|
||||
import io.dataease.license.utils.LicenseUtil;
|
||||
import io.dataease.utils.CommonBeanFactory;
|
||||
import io.dataease.utils.LogUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -23,6 +24,13 @@ public class CheckDsStatusJob implements Job {
|
||||
@Override
|
||||
public void execute(JobExecutionContext context) throws JobExecutionException {
|
||||
LogUtil.info("Begin to check ds status...");
|
||||
try {
|
||||
// 兼容同步管理
|
||||
// datasourceServer.updateDatasourceStatus() 前补 LicenseUtil.validate(),让 Quartz 线程先初始化 license ThreadLocal
|
||||
LicenseUtil.validate();
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
}
|
||||
datasourceServer.updateDatasourceStatus();
|
||||
}
|
||||
|
||||
|
||||
2
de-xpack
2
de-xpack
Submodule de-xpack updated: 7a5801a73e...07da549b03
Reference in New Issue
Block a user