From 1adb3a6b0466c3d129384c668034eb7f435b76cf Mon Sep 17 00:00:00 2001 From: Rogee Date: Thu, 5 Sep 2024 19:09:20 +0800 Subject: [PATCH] fix: issues --- internal/cmd_channel_export.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/cmd_channel_export.go b/internal/cmd_channel_export.go index 9757b16..5751db5 100644 --- a/internal/cmd_channel_export.go +++ b/internal/cmd_channel_export.go @@ -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 }