mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
Merge pull request #11947 from dataease/pr@dev-v2@perf_threshold_task
perf(X-Pack): 阈值告警任务
This commit is contained in:
@@ -36,18 +36,15 @@ public class DeTaskExecutor {
|
||||
public void init() {
|
||||
}
|
||||
|
||||
public void addThresholdTask(Long taskId, String cron, Long startTime, Long endTime) {
|
||||
public void addThresholdTask(Long taskId, String cron) {
|
||||
String key = taskId.toString();
|
||||
JobKey jobKey = new JobKey(key, THRESHOLD_JOB_GROUP);
|
||||
TriggerKey triggerKey = new TriggerKey(key, THRESHOLD_JOB_GROUP);
|
||||
JobDataMap jobDataMap = new JobDataMap();
|
||||
jobDataMap.put("taskId", taskId);
|
||||
jobDataMap.put("threshold", taskId);
|
||||
Date end = null;
|
||||
if (ObjectUtils.isNotEmpty(endTime)) end = new Date(endTime);
|
||||
Date startDate = new Date();
|
||||
if (ObjectUtils.isNotEmpty(startTime)) startDate = new Date(startTime);
|
||||
scheduleManager.addOrUpdateCronJob(jobKey, triggerKey, DeXpackScheduleJob.class, cron, startDate, end, jobDataMap);
|
||||
scheduleManager.addOrUpdateCronJob(jobKey, triggerKey, DeXpackScheduleJob.class, cron, startDate, null, jobDataMap);
|
||||
}
|
||||
|
||||
public void addOrUpdateTask(Long taskId, String cron, Long startTime, Long endTime) {
|
||||
|
||||
2
de-xpack
2
de-xpack
Submodule de-xpack updated: 2e0b320c99...2378ae36e6
Reference in New Issue
Block a user