perf(X-Pack): 阈值告警任务

This commit is contained in:
fit2cloud-chenyw 2024-08-14 17:13:42 +08:00
parent dc7cd9427a
commit 8570118226
2 changed files with 4 additions and 5 deletions

View File

@ -44,11 +44,10 @@ public class DeTaskExecutor {
jobDataMap.put("taskId", taskId); jobDataMap.put("taskId", taskId);
jobDataMap.put("threshold", taskId); jobDataMap.put("threshold", taskId);
Date end = null; Date end = null;
if (CronUtils.taskExpire(endTime)) {
return;
}
if (ObjectUtils.isNotEmpty(endTime)) end = new Date(endTime); if (ObjectUtils.isNotEmpty(endTime)) end = new Date(endTime);
scheduleManager.addOrUpdateCronJob(jobKey, triggerKey, DeXpackScheduleJob.class, cron, new Date(startTime), end, jobDataMap); Date startDate = new Date();
if (ObjectUtils.isNotEmpty(startTime)) startDate = new Date(startTime);
scheduleManager.addOrUpdateCronJob(jobKey, triggerKey, DeXpackScheduleJob.class, cron, startDate, end, jobDataMap);
} }
public void addOrUpdateTask(Long taskId, String cron, Long startTime, Long endTime) { public void addOrUpdateTask(Long taskId, String cron, Long startTime, Long endTime) {

@ -1 +1 @@
Subproject commit 72d0d127c79f5252a96f0f7754a89be6fbba3e01 Subproject commit 7b8dadc5e8fc8b99dc3840ea2f9dbf441d2c21a5