fix: issues
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"exporter/config"
|
||||
"exporter/pkg/errorx"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
@@ -52,6 +53,9 @@ func channelExportCmd(ctx context.Context) error {
|
||||
for {
|
||||
if err := client.Channel(ctx, channel, cfg, false); err != nil {
|
||||
logger.Error("failed to export channel", zap.Error(err), zap.Int64("uuid", channel.GetID()))
|
||||
if errors.Is(err, errorx.ErrNoNewMessage) {
|
||||
break
|
||||
}
|
||||
continueRetryTimes++
|
||||
if continueRetryTimes > 6 {
|
||||
return err
|
||||
@@ -64,4 +68,5 @@ func channelExportCmd(ctx context.Context) error {
|
||||
|
||||
continueRetryTimes = 0
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user