diff --git a/internal/ebooks/enrichment_queue.go b/internal/ebooks/enrichment_queue.go index f2c5d850..b3aca11e 100644 --- a/internal/ebooks/enrichment_queue.go +++ b/internal/ebooks/enrichment_queue.go @@ -17,7 +17,7 @@ const ( maxEnrichmentRetry = 24 * time.Hour transientRetryBase = 5 * time.Minute skippedRetryHorizon = 15 * time.Minute - claimCandidateWindow = 64 + claimCandidateWindow = maxEnrichWorkers ) type EnrichmentOutcome string diff --git a/internal/ebooks/enrichment_queue_test.go b/internal/ebooks/enrichment_queue_test.go index ac169441..72f5d4e9 100644 --- a/internal/ebooks/enrichment_queue_test.go +++ b/internal/ebooks/enrichment_queue_test.go @@ -87,8 +87,8 @@ func TestEnrichmentQueueClaimQueryUsesAtomicLeasedClaims(t *testing.T) { } }) } - if claimCandidateWindow <= 0 || claimCandidateWindow > 256 { - t.Fatalf("claim candidate window = %d, want a fixed sane bound", claimCandidateWindow) + if claimCandidateWindow != maxEnrichWorkers { + t.Fatalf("claim candidate window = %d, want worker ceiling %d", claimCandidateWindow, maxEnrichWorkers) } }