Releases: smallchungus/DistTaskQueue
Release list
v0.1.0
What's Changed
- fix(sweeper): Phase 3H — recover from BLPOP-to-claim race by @smallchungus in #13
Full Changelog: phase-3g...v0.1.0
Phase 3H: BLPOP-to-claim race fix
Sweeper now also re-pushes jobs that have been status='queued' with no last_error for longer than STALE_QUEUED_THRESHOLD_SEC (default 60s). Closes the one remaining correctness gap from a worker crashing mid-claim.
Phase 3G: Real cloudhq-equivalent output
Proper multipart MIME parsing (pick HTML, fall back to text), attachment preservation, and folder-per-email Drive layout with nice filenames. PDFs now actually say what the email said. Attachments ride along.
Phase 3F: Scheduler + OAuth Setup
Scheduler binary that polls Gmail every 5 min and enqueues fetch jobs. Plus cmd/oauth-setup, a one-time helper that walks the Google OAuth flow and saves an encrypted token to Postgres.
Phase 3E: Stage Handlers
Real Gmail->PDF->Drive pipeline. Three handlers (fetch/render/upload), Job model gains user/email columns, Handler interface gains nextStage return, Worker.ProcessOne advances jobs through stages. cmd/worker switches handler by --stage.
Phase 3D: Drive Client + Folder Cache
Drive client (EnsureFolder + Upload), Redis-backed FolderCache, and a small refactor moving OAuth token helpers from gmail to oauth pkg so both Gmail and Drive share them.
Phase 3C: Gotenberg PDF Rendering
Tiny HTTP client wrapping Gotenberg's Chromium HTML-to-PDF endpoint. Plus docker-compose sidecar.
Phase 3B: Gmail Client
Authenticated gmail.Service with auto-saving token refresh. LatestMessageIDs (Gmail History API → INBOX/PRIMARY message IDs + cursor). FetchMessage (raw MIME via base64url). httptest-mocked tests; real OAuth flow lands in Phase 3F.
Phase 3A: User Identity + OAuth Storage
Foundation for Gmail/Drive integration. Adds users, oauth_tokens, gmail_sync_state, processed_emails tables; ALTERs pipeline_jobs for multi-tenant columns; ships AES-GCM 256 helpers and store CRUD for users and OAuth tokens. No Google API code yet — that's Phase 3B+.
Phase 3: Gmail → Drive Pipeline (Milestone)
Phase 3 complete. The full Gmail → PDF → Drive pipeline runs end-to-end with a real Google account.
Sub-phases shipped: 3A (User identity + OAuth storage), 3B (Gmail client), 3C (Gotenberg PDF), 3D (Drive client + folder cache), 3E (Stage handlers), 3F (Scheduler + OAuth setup).
Next: Phase 1.5 (Hetzner k3s + multi-env CI/CD + first live deploy) and Phase 4 (live dashboard with B+D demo triggers).