docs: wanted, dbtest, recommendation and playlists comments say what the code does (#6277)
The same rewrite as d191a282, for four packages whose comments carried the
most history: tuning stories, quotes from the operator, single-install
measurements in library_scale.go, and 'used to' accounts of bugs. The
constraint each story protected stays as a present-tense reason (why tier 3
is reduced not removed, why the randomised arms take an order seed, why the
seed artist is eligible in Songs-like). Comments naming system_cron.go and
config.RecommendationConfig, neither of which holds what they claimed, now
name the scheduler and internal/recsettings.
Checked: non-comment tokens identical to HEAD; gofmt clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,8 +18,7 @@ import (
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/release"
|
||||
)
|
||||
|
||||
// Searching for wants on a schedule (M502 #5521), ported from Fabled
|
||||
// Librarian's internal/wanted. The schedule decides which wants and when;
|
||||
// Searching for wants on a schedule. The schedule decides which wants and when;
|
||||
// internal/acquire judges what a search finds and grabs.
|
||||
|
||||
// Search outcomes, matching wants_search_outcome_check.
|
||||
@@ -32,7 +31,7 @@ const (
|
||||
|
||||
const (
|
||||
// searchTick is how often the schedule looks for wants due; the
|
||||
// operator's setting is how long a want waits between searches.
|
||||
// search interval setting is how long a want waits between searches.
|
||||
searchTick = 10 * time.Minute
|
||||
// searchWindow is how long one pass searches: most of a tick, so a pass
|
||||
// ends before the next begins.
|
||||
@@ -194,7 +193,7 @@ type searchRow struct {
|
||||
artist, title, primary, date, group string
|
||||
secondary []string
|
||||
// upgrade, heldTier and held: a held album wanted for a better copy
|
||||
// (#5524), and the copy it has.
|
||||
// and the copy it has.
|
||||
upgrade, heldTier, held string
|
||||
}
|
||||
|
||||
@@ -346,7 +345,7 @@ func (s *Searcher) Take(ctx context.Context, id pgtype.UUID, key string, force b
|
||||
}
|
||||
|
||||
// load reads a want for a search: an open one, or a held album wanted for a
|
||||
// better copy (#5524).
|
||||
// better copy.
|
||||
func (s *Searcher) load(ctx context.Context, id pgtype.UUID) (acquire.Want, error) {
|
||||
row, err := dbq.New(s.pool).GetWantForSearch(ctx, id)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user