mirror of
https://github.com/grafana/grafana.git
synced 2026-08-12 06:05:02 -05:00
remove unused code
This commit is contained in:
@@ -19,7 +19,6 @@ func init() {
|
||||
bus.AddHandler("sql", DeleteAlertNotification)
|
||||
bus.AddHandler("sql", GetAlertNotificationsToSend)
|
||||
bus.AddHandler("sql", GetAllAlertNotifications)
|
||||
bus.AddHandlerCtx("sql", InsertAlertNotificationState)
|
||||
bus.AddHandlerCtx("sql", GetAlertNotificationState)
|
||||
bus.AddHandlerCtx("sql", SetAlertNotificationStateToCompleteCommand)
|
||||
bus.AddHandlerCtx("sql", SetAlertNotificationStateToPendingCommand)
|
||||
@@ -231,28 +230,6 @@ func UpdateAlertNotification(cmd *m.UpdateAlertNotificationCommand) error {
|
||||
})
|
||||
}
|
||||
|
||||
func InsertAlertNotificationState(ctx context.Context, cmd *m.InsertAlertNotificationCommand) error {
|
||||
return withDbSession(ctx, func(sess *DBSession) error {
|
||||
notificationState := &m.AlertNotificationState{
|
||||
OrgId: cmd.OrgId,
|
||||
AlertId: cmd.AlertId,
|
||||
NotifierId: cmd.NotifierId,
|
||||
SentAt: cmd.SentAt,
|
||||
State: cmd.State,
|
||||
}
|
||||
|
||||
if _, err := sess.Insert(notificationState); err != nil {
|
||||
if dialect.IsUniqueConstraintViolation(err) {
|
||||
return m.ErrAlertNotificationStateAlreadyExist
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func SetAlertNotificationStateToCompleteCommand(ctx context.Context, cmd *m.SetAlertNotificationStateToCompleteCommand) error {
|
||||
return withDbSession(ctx, func(sess *DBSession) error {
|
||||
version := cmd.State.Version
|
||||
|
||||
Reference in New Issue
Block a user