Commit Graph

2 Commits

Author SHA1 Message Date
martbost 8e6b5674ae Holding tank batches: throttled emails + round announcement (Marty 2026-11-15: "spread the emails out", "Post it to the new members area")
Assignments still happen at once. Only the assigned people's "X is now your sponsor" emails go
into a MySQL outbox (tank_batch_outbox, survives deploys): tankBatchEmailsPerDay (100) per
Central day, evenly spaced from tankBatchEmailStartHour 8 to tankBatchEmailEndHour 20 CT,
oldest first, through the site mailer (unsubscribe rules + link). Right before each send:
still with that sponsor, not unsubscribed, flagged, spam or erased, else skipped. Exactly once
across app copies: MySQL lock + conditional UPDATE queued->sending + marks claim per row. The
switch-on reminders for a batch person start when their email goes out.

Telegram: one announcement per round for the CTB group's General topic (tankBatchAnnounce,
tankBatchAnnounceChatId blank = the payments group, tankBatchAnnounceTopicId blank = General),
with the ladder card image (banners/holding-tank-leads-1200x675.jpg): total, sponsors by
level, how to qualify; then one card per sponsor in the payments topic, at least
tankBatchFeedGapMin (2) minutes apart. Sponsor emails stay one digest per round.

Admin: GET/POST /api/admin/tank/batches/mail (queued, sent today, next send, pause/resume),
POST /api/admin/tank/batches/round (the normal round path). Preview shows the email plan.
qa/tank-batch.test.mjs 78 checks (cap, window, skip-if-changed, two copies, pause).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:53:42 -06:00
martbost ccfaacc935 Holding tank batches (Marty 2026-11-15), master switch tankBatches OFF
Active members with their own paid package ($20+ InstantAdPay, $25+ LinkSpin via the
refuel record) receive tank people in batches: Paid 10, Fueled 20 (counted refuel streak
or a $50+ package), Twin Engine 25 (both engines this cycle or the top package, the live
catalog's highest, $500 today), +5 per further consecutive refuel month up to 50. Every
2 days per sponsor, topped up to their size, dealt by rotation highest tier first from
tank.adoptable() (grace, rule 3, LinkSpin adoptions respected), never self, own upline,
adopted twice, flagged, spam, mistyped, erased or unsubscribed. Same tank.adopt path
(sponsor change, chat, "X is now your sponsor" email, switch-on reminders); one notice
per batch to the sponsor. Uncontacted after 7 days -> back to the tank as 'unreached'
(not counted). Tank feed: payments-topic card + live toast, sponsor/count/level only.
Member panel "How to get fed leads" (tankfeed.js). Every number is a site setting.

5xYourTeam draft gets its own cap (fiveXDraftCap, default 10): open draft picks only;
plain adoptions, the 24-hour safety net and batches each count their own people.
Admin: GET /api/admin/tank/batches/preview (read-only) + /api/admin/tank/batches.
Chatbot: coming soon only. qa/tank-batch.test.mjs (60 checks) in run.sh member.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:59:20 -06:00