diff --git a/internal/cmd_channel_export.go b/internal/cmd_channel_export.go index a0ac319..7a9a96c 100644 --- a/internal/cmd_channel_export.go +++ b/internal/cmd_channel_export.go @@ -3,7 +3,6 @@ package internal import ( "context" "log" - "math" "time" "exporter/config" @@ -52,13 +51,12 @@ func channelExportCmd(ctx context.Context) error { if err := client.Channel(ctx, channel, cfg, false); err != nil { logger.Error("failed to export channel", zap.Error(err), zap.Int64("uuid", channel.GetID())) continueRetryTimes++ - sleepSeconds := math.Pow(2, float64(1+continueRetryTimes)) - if sleepSeconds > 128 { + if continueRetryTimes > 6 { return err } - logger.Info("retry after", zap.Int("seconds", int(sleepSeconds))) - time.Sleep(time.Second * time.Duration(sleepSeconds)) + logger.Info("retry after 1 min") + time.Sleep(time.Minute) continue }