Skip to content

Commit

Permalink
fix(cli): fix renaming func
Browse files Browse the repository at this point in the history
  • Loading branch information
kissken committed Sep 21, 2023
1 parent 18f8ce2 commit 4a33ac7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cmd/cli/from_2.7_to_2.8.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
package main

import "github.com/moira-alert/moira"
import (
"fmt"

"github.com/moira-alert/moira"
)

func updateFrom27(logger moira.Logger, dataBase moira.Database) error {
logger.Info().Msg("Update 2.7 -> 2.8 was started")

logger.Info().Msg("Rename keys was started")
if err := updateSubscriptionKeyForAnonymous(logger, dataBase); err != nil {
logger.Error().Msg("Cannot call updateSubscriptionKeyForAnonymous")
return err
return fmt.Errorf("сannot call updateSubscriptionKeyForAnonymous, has error %v", err)
}

if err := updateContactKeyForAnonymous(logger, dataBase); err != nil {
logger.Error().Msg("updateContactKeyForAnonymous")
return err
return fmt.Errorf("сannot call updateContactKeyForAnonymous, has error %v", err)
}

logger.Info().Msg("Update 2.7 -> 2.8 was finished")
Expand Down

0 comments on commit 4a33ac7

Please sign in to comment.