fix: send scheduled campaigns on BullMQ 5 - #445
Conversation
|
@vladbisceanu is attempting to deploy a commit to the kmkoushik's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughCampaign batch jobs now use hyphen-separated IDs in Suggested reviewers: Merge Risk: ⚪ Minimal · up to This changes the scheduled-campaign job identifier to a BullMQ-compatible format so scheduled campaigns can enqueue and run; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
apps/web/src/server/service/campaign-service.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. apps/web/src/server/service/campaign-service.unit.test.tsESLint skipped: the matched ESLint configuration already failed (missing-dependency). 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 |
Scheduled campaigns never leave SCHEDULED on BullMQ 5. The batch queue uses a custom job ID containing a colon, which BullMQ rejects with "Custom Id cannot contain :".
This changes the separator to a hyphen and adds a regression test at the CampaignBatchService.queueBatch call site.
Verification:
Migration notes: none. No schema, configuration, or dependency changes.
Summary by cubic
Scheduled campaigns on
bullmq5 were stuck in SCHEDULED because the batch queue used a custom job ID with a colon, whichbullmqrejects. We now use a hyphenated job ID, so campaigns enqueue and execute.Queue.addreceives the expected arguments; adjusts test mocks to spy on queue and contact updates.Written for commit dc0bdae. Summary will update on new commits.
Summary by CodeRabbit