Skip to content

Commit

Permalink
Make logging more verbose when computing item signals
Browse files Browse the repository at this point in the history
  • Loading branch information
brawer committed May 15, 2024
1 parent 0f9789d commit 468514d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/qrank-builder/itemsignals.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,17 @@ func buildItemSignals(ctx context.Context, pageviews []string, sites *map[string
group, groupCtx := errgroup.WithContext(ctx)
group.Go(func() error {
joiner := itemSignalsJoiner{out: sigChan}
var linesMerged int64
for merger.Advance() {
if err := joiner.Process(merger.Line()); err != nil {
joiner.Close()
logger.Printf("ItemSignalsJoiner.Process() failed: %v", err)
return err
}
linesMerged += 1
}
joiner.Close()
logger.Printf("ItemSignalsJoiner: finished")
logger.Printf("ItemSignalsJoiner: read %d lines", linesMerged)
if err := merger.Err(); err != nil {
logger.Printf("LineMerger failed: %v", err)
return err
Expand Down

0 comments on commit 468514d

Please sign in to comment.