Extract BullMQ workers to a separate process before v9 streaming #117
Labels
No labels
bug
duplicate
enhancement
future
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/TeaLeaves#117
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Low · Confidence: High · Category: architecture (v9 prerequisite)
Evidence
api/src/index.ts:17-29- all BullMQ workers +startBackupScheduler()+app.listenrun in one process.mediaProcessorWorker), ONNX embeddings (ai.tslocal), restic/pg_dump (backup).Assessment
One process for API + all workers is appropriate for a single-user homelab today and keeps deployment simple. But heavy jobs compete with request handling for the event loop, and a wedged worker (see F-09) can degrade API latency. The v9 plan (Mastodon streaming + Bluesky Jetstream) introduces long-lived connections - a different runtime shape the v9 issue itself flags - that will strain the single-process model more than short BullMQ jobs do.
Recommendation
Keep as-is for now. Before v9 (streaming) starts, extract workers into a second container sharing the codebase (compose service
worker) with shared Redis/DB - the natural home for v9's long-lived streams. Honest case for doing nothing: at one user and current volumes, the single process is fine and simpler to operate - so this is a v9 prerequisite, not a standalone task.Acceptance criteria
Filed from the 2026-07-15 codebase audit. Full report:
docs/.internal/report-2026-07-15.md(gitignored).restart: on-failurein the compose file —unless-stoppedbypasses docker-host's boot pacing #152restart: on-failurein the compose file —unless-stoppedbypasses docker-host's boot pacing #152unhealthy— it inherits the API image's HTTP healthcheck but serves no HTTP #156