Просмотр исходного кода

tech(alerting): remove some logging

bergquist 9 лет назад
Родитель
Сommit
6bf42dde18

+ 0 - 1
pkg/services/alerting/notifier.go

@@ -150,7 +150,6 @@ func buildGetNotifiers(log log.Logger) func(orgId int64, notificationGroups []in
 		}
 
 		var result []*Notification
-		log.Info("notifiriring", "count", len(query.Result), "groups", notificationGroups)
 		for _, notification := range query.Result {
 			not, err := NewNotificationFromDBModel(notification)
 			if err == nil {

+ 0 - 2
pkg/services/alerting/result_handler.go

@@ -59,8 +59,6 @@ func (handler *ResultHandlerImpl) shouldUpdateState(result *AlertResult) bool {
 		return true
 	}
 
-	//now := time.Now()
-	//olderThen15Min := query.Result.Created.Before(now.Add(time.Minute * -15))
 	lastExecution := query.Result.Created
 	asdf := result.ExeuctionTime.Add(time.Minute * -15)
 	olderThen15Min := lastExecution.Before(asdf)

+ 1 - 1
pkg/services/sqlstore/alert_state.go

@@ -24,7 +24,7 @@ func GetLastAlertStateQuery(cmd *m.GetLastAlertStateQuery) error {
 
 	if len(states) == 0 {
 		cmd.Result = nil
-		return fmt.Errorf("invalid amount of alertstates. Expected 1 got %v", len(states))
+		return nil
 	}
 
 	cmd.Result = &states[0]