Trim heavy search stages to avoid 504
build-push / docker (push) Successful in 4m2s

This commit is contained in:
AI Assistant
2026-03-16 13:55:10 +09:00
parent c92ef97c98
commit a37e02aea9
4 changed files with 18 additions and 7 deletions
+3 -3
View File
@@ -64,9 +64,9 @@ func (s *SearchService) SearchMedia(queries []string, enabledPlatforms map[strin
results := make([]SearchResult, 0, 90)
var lastErr error
baseQueries := limitQueries(queries, 10)
baseQueries := limitQueries(queries, 8)
shuffleStrings(baseQueries)
primaryQueries := baseQueries[:minInt(len(baseQueries), 5)]
primaryQueries := baseQueries[:minInt(len(baseQueries), 4)]
runSearchPass := func(bases []string, onlyMissing bool) {
for _, base := range bases {
base = strings.TrimSpace(base)
@@ -127,7 +127,7 @@ func (s *SearchService) SearchMedia(queries []string, enabledPlatforms map[strin
}
func (s *SearchService) EnrichResults(results []SearchResult) []SearchResult {
limit := minInt(len(results), 18)
limit := minInt(len(results), 12)
if limit == 0 {
return results
}