optimize: 移除两处冗余的代码 (初始化后未使用|重复初始化)

This commit is contained in:
Akkia 2022-04-12 00:01:38 +08:00
parent 707985e5c8
commit 3d5e292d26
No known key found for this signature in database
GPG Key ID: 464BA42A151C1E0F
2 changed files with 0 additions and 6 deletions

View File

@ -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 {

View File

@ -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定时将服务监控任务传递给任务调度管道