rename CronCoverSelf to CronCoverAlertTrigger

This commit is contained in:
naiba
2022-09-14 22:14:47 +08:00
parent 13abf2af13
commit a5ddafbd8b
3 changed files with 5 additions and 4 deletions

View File

@@ -3,9 +3,10 @@ package singleton
import (
"bytes"
"fmt"
"github.com/jinzhu/copier"
"sync"
"github.com/jinzhu/copier"
"github.com/robfig/cron/v3"
"github.com/naiba/nezha/model"
@@ -90,7 +91,7 @@ func CronTrigger(cr model.Cron, triggerServer ...uint64) func() {
crIgnoreMap[cr.Servers[j]] = true
}
return func() {
if cr.Cover == model.CronCoverSelf {
if cr.Cover == model.CronCoverAlertTrigger {
if len(triggerServer) == 0 {
return
}