Skip to content

Commit

Permalink
Skip records which have not arrived
Browse files Browse the repository at this point in the history
  • Loading branch information
brotherlogic committed May 12, 2023
1 parent ea6f182 commit 0e4e06c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cdprocessorutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ func (s *Server) makeLinks(ctx context.Context, ID int32, force bool) error {
return err
}

// Skip records which aren't here yet
if record.GetMetadata().GetDateArrived() == 0 && time.Since(time.Unix(record.GetMetadata().GetDateAdded(), 0)) < time.Hour*24*365 {
s.CtxLog(ctx, "Skipping because it's not arrived yet")
return nil
}

// Skip records which aren't in the listening pile
if record.GetRelease().GetFolderId() != 812802 {
s.CtxLog(ctx, "Skipping because it's not in the listening pile")
Expand Down

0 comments on commit 0e4e06c

Please sign in to comment.