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