fix(测试跟踪): 定时任务同步缺陷有误

--bug=1029275 --user=陈建星 【测试跟踪】github#26302,开源版v2.10.4-lts从禅道同步Bug https://www.tapd.cn/55049933/s/1407172
This commit is contained in:
jianxing 2023-08-22 18:23:07 +08:00 committed by jianxing
parent 487abd81bc
commit 66e98b2d14
1 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import io.metersphere.service.IssuesService;
import io.metersphere.xpack.license.dto.LicenseDTO; import io.metersphere.xpack.license.dto.LicenseDTO;
import io.metersphere.xpack.license.service.LicenseService; import io.metersphere.xpack.license.service.LicenseService;
import io.metersphere.xpack.track.service.XpackIssueService; import io.metersphere.xpack.track.service.XpackIssueService;
import org.apache.commons.lang3.StringUtils;
import org.quartz.JobExecutionContext; import org.quartz.JobExecutionContext;
/** /**
@ -27,7 +28,8 @@ public class IssueSyncJob extends MsScheduleJob {
@Override @Override
public void businessExecute(JobExecutionContext context) { public void businessExecute(JobExecutionContext context) {
LicenseDTO licenseDTO = licenseService.validate(); LicenseDTO licenseDTO = licenseService.validate();
if (licenseDTO != null && licenseDTO.getLicense() != null) { if (licenseDTO != null && licenseDTO.getLicense() != null
&& StringUtils.equals(licenseDTO.getStatus(), "valid")) {
LogUtil.info("sync all issue start"); LogUtil.info("sync all issue start");
xpackIssueService.syncThirdPartyIssues(); xpackIssueService.syncThirdPartyIssues();
} else { } else {