Repository navigation
refactor: extract replenisher (phase 3.6 - final) - #670
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 17 minutes and 8 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
07e3b91 to
1548cc6
Compare
Post-merge cleanup: queueManipulation.ts had inline defs of collectLastFmCandidates and searchLastFmQuery left from the pre-#668 base. Both are now imported from autoplay/lastFmSeeder. Re-exported collectLastFmCandidates for back-compat.
…didates from queueManipulation
|
* refactor: extract replenisher from queueManipulation (phase 3.6 - final) * fix(bot): remove duplicate lastFmSeeder defs after main merge Post-merge cleanup: queueManipulation.ts had inline defs of collectLastFmCandidates and searchLastFmQuery left from the pre-#668 base. Both are now imported from autoplay/lastFmSeeder. Re-exported collectLastFmCandidates for back-compat. * fix: correct imports after merge resolution - export collectLastFmCandidates from queueManipulation



Phase 3.6 Summary - Final Refactor
Extracted the core autoplay orchestrator
_replenishQueue(350 LOC) to a dedicated module, completing Phase 3 of the queueManipulation refactor.Changes:
New:
packages/bot/src/utils/music/autoplay/replenisher.ts(458 LOC)replenishQueue()wrapper with concurrency locks_replenishQueueorchestration logicgetRequestedBy,buildRecentArtists,buildArtistFrequency,getAllHistoryTracksUpdated:
packages/bot/src/utils/music/queueManipulation.ts(1354 LOC, down from 1757)replenishQueuefor caller compatibilityNew:
packages/bot/src/utils/music/autoplay/replenisher.spec.ts(183 LOC)Phase 3 Totals (3.1-3.6):
Verification:
npm run type:check✓ cleannpm test -- --testPathPatterns='queueManipulation|replenisher'✓ 138 tests pass