Skip to content

Commit

Permalink
Discover repos more enthusiastically
Browse files Browse the repository at this point in the history
  • Loading branch information
ericvolp12 committed Sep 23, 2023
1 parent 68769df commit 7f365fd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions search/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ func (s *Server) RunIndexer(ctx context.Context) error {
return nil
}

// Check if we've backfilled this repo, if not, we should enqueue it
job, err := s.bfs.GetJob(ctx, evt.Repo)
if job == nil && err == nil {
logEvt.Info("enqueueing backfill job for new repo")
if err := s.bfs.EnqueueJob(evt.Repo); err != nil {
logEvt.Warn("failed to enqueue backfill job", "err", err)
}
}

r, err := repo.ReadRepoFromCar(ctx, bytes.NewReader(evt.Blocks))
if err != nil {
// TODO: handle this case (instead of return nil)
Expand Down

0 comments on commit 7f365fd

Please sign in to comment.