Skip to content

Commit

Permalink
Merge f106a25 into 1a55f30
Browse files Browse the repository at this point in the history
  • Loading branch information
brotherlogic committed Oct 17, 2019
2 parents 1a55f30 + f106a25 commit c7f2ce9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cdprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down
2 changes: 1 addition & 1 deletion cdprocessorutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down

0 comments on commit c7f2ce9

Please sign in to comment.