Merge pull request #11996 from dataease/pr@dev-v2@perf_threshold_task_log

Pr@dev v2@perf threshold task log
This commit is contained in:
fit2cloud-chenyw 2024-09-04 14:02:06 +08:00 committed by GitHub
commit d00d165fc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 5 deletions

View File

@ -2,6 +2,7 @@ package io.dataease.job.schedule;
import io.dataease.license.utils.LicenseUtil;
import io.dataease.utils.CommonBeanFactory;
import io.dataease.utils.LogUtil;
import jakarta.annotation.Resource;
import org.quartz.*;
import org.springframework.stereotype.Component;
@ -19,10 +20,14 @@ public class DeXpackScheduleJob implements Job {
JobDataMap jobDataMap = jobExecutionContext.getJobDetail().getJobDataMap();
DeTaskExecutor deTaskExecutor = CommonBeanFactory.getBean(DeTaskExecutor.class);
assert deTaskExecutor != null;
LicenseUtil.validate();
boolean taskLoaded = deTaskExecutor.execute(jobDataMap);
if (!taskLoaded) {
Objects.requireNonNull(CommonBeanFactory.getBean(ScheduleManager.class)).removeJob(jobKey, trigger.getKey());
try {
LicenseUtil.validate();
boolean taskLoaded = deTaskExecutor.execute(jobDataMap);
if (!taskLoaded) {
Objects.requireNonNull(CommonBeanFactory.getBean(ScheduleManager.class)).removeJob(jobKey, trigger.getKey());
}
} catch (Exception e) {
LogUtil.error(e.getMessage(), e.getCause());
}
}
}

@ -1 +1 @@
Subproject commit 2ffa11f9693af0c4dbf8798aebd6e0c860f86c46
Subproject commit 89006a67be063c57e4594105cbb302f44de99269