Commit d412aafb by Marcus Efraimsson

remove unused code

parent d313ffa8
......@@ -111,10 +111,3 @@ type GetNotificationStateQuery struct {
Result *AlertNotificationState
}
type InsertAlertNotificationCommand struct {
OrgId int64
AlertId int64
NotifierId int64
SentAt int64
State AlertNotificationStateType
}
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment