Merge pull request #11558 from dataease/pr@dev-v2@perf_threshold_task

perf(X-Pack): 阈值告警任务
This commit is contained in:
fit2cloud-chenyw
2024-08-14 17:16:05 +08:00
committed by GitHub
2 changed files with 4 additions and 5 deletions

View File

@@ -44,11 +44,10 @@ public class DeTaskExecutor {
jobDataMap.put("taskId", taskId);
jobDataMap.put("threshold", taskId);
Date end = null;
if (CronUtils.taskExpire(endTime)) {
return;
}
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) {