diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go index fce8654..3bfeb2a 100644 --- a/cmd/dashboard/main.go +++ b/cmd/dashboard/main.go @@ -171,11 +171,6 @@ func loadCrons() { for i := 0; i < len(crons); i++ { cr := crons[i] - crIgnoreMap := make(map[uint64]bool) - for j := 0; j < len(cr.Servers); j++ { - crIgnoreMap[cr.Servers[j]] = true - } - // 注册计划任务 cr.CronJobID, err = singleton.Cron.AddFunc(cr.Scheduler, singleton.CronTrigger(cr)) if err == nil { diff --git a/service/singleton/servicesentinel.go b/service/singleton/servicesentinel.go index 50aa78f..cb897d5 100644 --- a/service/singleton/servicesentinel.go +++ b/service/singleton/servicesentinel.go @@ -149,7 +149,6 @@ func (ss *ServiceSentinel) loadMonitorHistory() { var err error ss.monitorsLock.Lock() defer ss.monitorsLock.Unlock() - ss.monitors = make(map[uint64]*model.Monitor) for i := 0; i < len(monitors); i++ { task := *monitors[i] // 通过cron定时将服务监控任务传递给任务调度管道