Repository navigation
feat(hub): add PostgreSQL background jobs - #145
Merged
Merged
Conversation
Add separate on-demand and scheduled BullMQ consumers, explicit release setup, validated job contracts, and isolated PostgreSQL test coverage without porting product jobs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Nishiki <1121087+nshki@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because there is no eligible user to bill.
An enterprise owner can allow the organization to be billed for reviews like this by enabling Copilot code review for users without a license.
Extract worker database URL access and end-of-test queue disposal while retaining explicit reset-test resource ownership. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Nishiki <1121087+nshki@users.noreply.github.com>
Remove low-value schema and helper edge cases, import-only checks, and mocked enqueue failures. Retain real persistence, schedule identity, isolation, retries, and shutdown safeguards. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Nishiki <1121087+nshki@users.noreply.github.com>
Copilot
AI
force-pushed
the
copilot/hub-jobs-foundation
branch
from
October 28, 2026 19:16
0815762 to
8f37334
Compare
alliscode
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The new Express Hub needs a shared foundation for background and recurring work before its Rails jobs can move over. This adds that foundation with PostgreSQL persistence and independent capacity for application-requested and scheduled work.
Closes #141.
What changes
BullMQ uses its PostgreSQL backend with two queues,
on-demandandscheduled. Each has a separate worker command and concurrency setting. Producers submit validated payloads; workers validate them again, dispatch registered handlers, and drain active work on shutdown.An explicit setup command runs Prisma migrations, BullMQ migrations, and schedule registration before application startup. Stable schedule IDs keep repeated deployments from creating duplicate schedules. Vitest prepares BullMQ in the database template and resets job data inside each worker's isolated database without clearing migration history.
The background-jobs guide documents process ownership, retries, delivery guarantees, and future domain requirements. No Rails jobs or production schedules are ported. Production images, frontend hosting, and deployment orchestration remain outside this change.
Created from a Slack conversation.