gigafibre-fsm/services
louispaulb 07b0331a3a Events: self-serve resume for a send interrupted by a hub restart
A hub restart kills sendEventCampaignAsync's in-memory loop mid-flight,
leaving a campaign stuck at status='sending' with recipients still
'pending' — this happened live today and required a manual server-side
fix. Building a proper resume path instead of relying on that:

- resumeCampaignSend(campaignId): re-reads channel/from/event_id from the
  campaign's own params (nothing to re-enter), refuses if nothing is
  pending or a send is already active, and re-invokes the same worker,
  which skips already-'sent' rows — safe to call on a healthy campaign too.
- Anti-double-send guard (activeEventSends / tryReserveSend): reservation
  now happens synchronously at the scheduling point (massSend/reminderSend/
  resumeCampaignSend), not inside the deferred setImmediate callback —
  closes a race where two near-simultaneous calls could both slip through
  before either worker actually started.
- New route: POST /events/campaign-resume {campaign_id}.
- CampaignDetailPage.vue: "Reprendre l'envoi" button, shown only for
  event-type campaigns stuck at status='sending' with pending recipients.

Verified live: used the new endpoint to resume the real in-progress "On
fête nos 20 ans" campaign after this exact deploy interrupted it — resumed
cleanly with zero duplicate sends.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:12:27 -04:00
..
cogeco-checker fix(cogeco-checker): disable browser cache to rule it out as 401 cause 2026-06-01 21:47:19 -04:00
docuseal refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables 2026-04-08 17:38:38 -04:00
email-editor feat(email-editor): persist easy-email JSON state for instant restore on reload 2026-05-22 06:04:48 -04:00
legacy-bridge feat(ops): wireless on the same status cards + DHCP leases (F parity) 2026-07-21 15:17:34 -04:00
legacy-db refactor: major cleanup — remove dead dispatch app, commit all backend code, extract client composables 2026-04-08 17:38:38 -04:00
modem-bridge feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
osrm feat(dispatch): OSRM road-time matrix for the VRP optimizer (Phase 2) 2026-07-02 13:48:43 -04:00
roster-solver hub+solveur : compétences multi par job + réservation + matérialisation quarts + app terrain natif 2026-07-07 20:46:42 -04:00
targo-hub Events: self-serve resume for a send interrupted by a hub restart 2026-07-24 10:12:27 -04:00