任务ID直接使用监控项名称

This commit is contained in:
hanxuanyu 2022-02-09 17:34:26 +08:00
parent 1016ad6751
commit a53455bf87

View File

@ -69,7 +69,7 @@ public class MonitorItemBeanManager implements ApplicationListener<ContextRefres
}
public Msg<String> addMonitorTask(BaseMonitorItem item) {
String taskId = "ScheduledTask-" + item.getMonitorItemName();
String taskId = item.getMonitorItemName();
if (MONITOR_ITEM_MAP.containsKey(taskId)) {
return Msg.failed("任务已经存在,请执行修改操作");
}