optimize: 移除两处冗余的代码 (初始化后未使用|重复初始化)
This commit is contained in:
parent
707985e5c8
commit
3d5e292d26
@ -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 {
|
||||
|
@ -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定时将服务监控任务传递给任务调度管道
|
||||
|
Loading…
Reference in New Issue
Block a user