Skip to content

v0.6.4 — per-recipient queue, live progress, logs filters/CSV

Choose a tag to compare

@JuansesDev JuansesDev released this 08 May 06:12
· 209 commits to main since this release

What's new

Per-recipient broadcast queue with retries (#41)

Broadcasts and scheduled campaigns no longer run in a single goroutine that loses everything on restart. Each recipient is enqueued as a row in a new broadcast_jobs table; five worker goroutines drain it concurrently using SELECT … FOR UPDATE SKIP LOCKED.

  • Transient SMTP errors (4xx, network, DNS) reschedule the job with exponential backoff (30s → 2m → 8m → 30m → 1h), capping at five attempts before the recipient is marked failed.
  • SMTP 5xx bounces are not retried — they are tagged bounced and the recipient is added to the suppression list.
  • A backend restart mid-broadcast resets jobs that were sending to retry so sending resumes from where it left off with no duplicate sends and none silently dropped.

Live progress everywhere

  • The Newsletters list shows sent_count / failed_count updating every five seconds while a campaign is in sending, instead of jumping from 0/0 to the final number at the end.
  • Same for the Broadcasts tab progress bars.
  • New "Broadcasts in flight" panel on Pro Analytics: appears at the top of the dashboard whenever at least one broadcast is sending, with progress bar, elapsed time, and per-status counters.

Email Logs filters and CSV export (#44)

  • Status filter is now a row of clickable chips (Sent / Failed / Bounced / Suppressed) with status-tinted highlight.
  • New Template dropdown to filter logs to a single template's sends.
  • New Export CSV button (top right of Logs) downloads every row matching the active filters via a new GET /api/v1/projects/{id}/logs/export.csv endpoint.

Other

  • Native date pickers across the app now render dark mode in Chromium and Firefox.

Fixed

  • /health no longer kills the container on transient Postgres latency. v0.6.3 introduced a synchronous 2-second PingContext on every /health call. When Postgres took >2s for any reason, healthcheck failed five times in a row and the orchestrator killed the container — only to start a new one with the same problem. The endpoint is now backed by a background goroutine that pings Postgres every 10s with a 5s timeout; /health reads an atomic last-success timestamp and returns 503 only if no successful ping has happened in the last 60 seconds.
  • Newsletter shown as sent with 213/0 immediately. With the new queue, EmailService.Broadcast returns in milliseconds, so the campaign worker — which used to mark the campaign as sent with the upfront recipient count — claimed the campaign was finished before any recipient had been sent to. Campaigns now stay in sending, linked to their broadcast via a new campaigns.broadcast_id FK; the broadcast worker cascades real sent_count / failed_count back when the queue drains.

New troubleshooting docs

A new section in Troubleshooting → Docker Swarm / Dokploy documents a recurring "all services on the same host stop talking to each other" pattern caused by accumulated dead containers and orphan services confusing the Docker Swarm DNS resolver. Includes diagnostic commands and a safe cleanup procedure.

Upgrade notes

  • Two new migrations (20260508010000_add_broadcast_jobs, 20260508020000_link_campaigns_to_broadcasts) apply automatically on container start. No manual steps.
  • No breaking API changes. The /logs endpoint accepts new optional query parameters (template_id, q); existing callers continue to work unchanged.
  • Existing campaigns marked sent before this release stay as-is; only campaigns scheduled after the upgrade use the new sending → broadcast → completed flow.

Full changelog: https://github.com/Arkhe-Systems/senddock/blob/main/CHANGELOG.md