Skip to content

Commit

Permalink
fix[agent]: cleanup getSyncStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Andreyko committed Sep 26, 2023
1 parent b58a48b commit 1d9b4f9
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions cmd/to-nft/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import (
gs "github.com/H-BF/corlib/pkg/patterns/graceful-shutdown"
"github.com/pkg/errors"
"go.uber.org/zap"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/emptypb"
)

Expand Down Expand Up @@ -171,17 +169,6 @@ loop0:
return err
}

func getSyncStatus(ctx context.Context, c SGClient) (model.SyncStatus, error) {
var ret model.SyncStatus
resp, err := c.SyncStatus(ctx, new(emptypb.Empty))
if err == nil {
ret.UpdatedAt = resp.GetUpdatedAt().AsTime()
} else if e := errors.Cause(err); status.Code(e) == codes.NotFound {
err = nil
}
return ret, err
}

func getSyncStatuses(ctx context.Context, c SGClient) <-chan model.SyncStatus {
const timeoutBeforeRetry = 10 * time.Second

Expand Down

0 comments on commit 1d9b4f9

Please sign in to comment.