diff --git a/cdprocessor.go b/cdprocessor.go index da1521f..c948692 100644 --- a/cdprocessor.go +++ b/cdprocessor.go @@ -387,7 +387,8 @@ func (s *Server) runLink(ctx context.Context) error { s.count = int64(0) for _, rip := range s.rips { err := s.makeLinks(ctx, rip.Id, false) - if err != nil { + st := status.Convert(err) + if st.Code() != codes.ResourceExhausted || err != nil { return err } s.count++ diff --git a/cdprocessorutils.go b/cdprocessorutils.go index 6cca7e3..8d3fe8f 100644 --- a/cdprocessorutils.go +++ b/cdprocessorutils.go @@ -94,7 +94,7 @@ func computeArtist(rec *pbgd.Release) string { func (s *Server) makeLinks(ctx context.Context, ID int32, force bool) error { if val, ok := s.config.LastProcessTime[ID]; ok { if time.Now().Sub(time.Unix(val, 0)) < time.Hour*24 { - return fmt.Errorf("This has been linked recently") + return status.Error(codes.ResourceExhausted, "This has been linked recently") } }