fix(项目管理): 同步缺陷Cron表达式打印有误
--bug=1039563 --user=宋昌昌 【项目管理】项目与权限-缺陷管理-同步缺陷设置6小时增量同步一次不生效 https://www.tapd.cn/55049933/s/1501982
This commit is contained in:
parent
98b4b1d868
commit
fa68d41013
|
@ -45,26 +45,28 @@ public class BugSyncJob extends BaseScheduleJob {
|
|||
if (!checkBeforeSync(resourceId)) {
|
||||
return;
|
||||
}
|
||||
LogUtils.info("bug sync job start......");
|
||||
LogUtils.info("Start verify license and synchronizing bugs");
|
||||
try{
|
||||
if (licenseService == null) {
|
||||
LogUtils.info("license is null, sync remain bug");
|
||||
// 没有License, 同步存量缺陷
|
||||
LogUtils.info("No license, synchronization stock bug");
|
||||
bugSyncService.syncPlatformBugBySchedule(resourceId, userId);
|
||||
} else {
|
||||
LicenseDTO licenseDTO = licenseService.validate();
|
||||
if (licenseDTO != null && licenseDTO.getLicense() != null
|
||||
&& StringUtils.equals(licenseDTO.getStatus(), "valid")) {
|
||||
LogUtils.info("license is valid, sync all bug");
|
||||
// License校验成功, 同步全量缺陷
|
||||
LogUtils.info("License verification successful, synchronization full bug");
|
||||
bugSyncService.syncPlatformAllBugBySchedule(resourceId, userId);
|
||||
} else {
|
||||
LogUtils.info("license is invalid, sync remain bug");
|
||||
// License校验失败, 同步存量缺陷
|
||||
LogUtils.info("License verification failed, synchronization stock bug");
|
||||
bugSyncService.syncPlatformBugBySchedule(resourceId, userId);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtils.error(e.getMessage());
|
||||
}
|
||||
LogUtils.info("bug sync job end......");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -549,12 +549,13 @@ public class BugService {
|
|||
// 分页同步
|
||||
SubListUtils.dealForSubList(remainBugs, 100, (subBugs) -> doSyncPlatformBugs(subBugs, project));
|
||||
} catch (Exception e) {
|
||||
LogUtils.error(e);
|
||||
LogUtils.error("Synchronization bugs exception occurred :" + e.getMessage());
|
||||
// 异常或正常结束都得删除当前项目执行同步的Key
|
||||
bugSyncExtraService.deleteSyncKey(project.getId());
|
||||
// 同步缺陷异常, 当前同步错误信息 -> Redis(check接口获取)
|
||||
bugSyncExtraService.setSyncErrorMsg(project.getId(), e.getMessage());
|
||||
} finally {
|
||||
LogUtils.info("Synchronization bugs end......");
|
||||
// 异常或正常结束都得删除当前项目执行同步的Key
|
||||
bugSyncExtraService.deleteSyncKey(project.getId());
|
||||
// 发送同步通知
|
||||
|
|
|
@ -13,7 +13,6 @@ import io.metersphere.project.service.ProjectTemplateService;
|
|||
import io.metersphere.sdk.constants.TemplateScene;
|
||||
import io.metersphere.sdk.exception.MSException;
|
||||
import io.metersphere.sdk.util.CommonBeanFactory;
|
||||
import io.metersphere.sdk.util.LogUtils;
|
||||
import io.metersphere.sdk.util.Translator;
|
||||
import io.metersphere.system.domain.Template;
|
||||
import io.metersphere.system.domain.TemplateExample;
|
||||
|
@ -162,7 +161,6 @@ public class BugSyncService {
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtils.error(e);
|
||||
// 异常或正常结束都得删除当前项目执行同步的唯一Key
|
||||
bugSyncExtraService.deleteSyncKey(projectId);
|
||||
// 同步缺陷异常, 当前同步错误信息 -> Redis(check接口获取)
|
||||
|
|
|
@ -20,7 +20,6 @@ public abstract class BaseScheduleJob implements Job {
|
|||
this.expression = jobDataMap.getString("expression");
|
||||
|
||||
LogUtils.info(jobKey.getGroup() + " Running: " + resourceId);
|
||||
LogUtils.info("CronExpression: " + expression);
|
||||
businessExecute(context);
|
||||
}
|
||||
|
||||
|
|
|
@ -824,6 +824,7 @@
|
|||
console.log(e);
|
||||
}
|
||||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
await loadList();
|
||||
};
|
||||
|
@ -857,6 +858,12 @@
|
|||
}
|
||||
};
|
||||
|
||||
async function initMenuData() {
|
||||
setLoadListParams({ projectId: currentProjectId.value });
|
||||
await fetchData();
|
||||
await initExpendKeys();
|
||||
}
|
||||
|
||||
// 点击展开
|
||||
const handleRowClick = (record: TableData) => {
|
||||
if (record.module) {
|
||||
|
@ -864,12 +871,6 @@
|
|||
}
|
||||
};
|
||||
|
||||
function initMenuData() {
|
||||
setLoadListParams({ projectId: currentProjectId.value });
|
||||
fetchData();
|
||||
initExpendKeys();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
initMenuData();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue