feat(worker): BullMQ job queue for sequence steps and workflow delays#32
Merged
Conversation
the ci.yml e2e job already runs playwright against the web package with the right setup. this root-level workflow duplicated it, ran npx playwright test with no database, and never passed.
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.
this adds the packages/worker package so the automation engine can actually run in the background instead of blocking a request. it wires BullMQ onto the redis we already declare in docker-compose, with two job types, sequence-step and workflow-delay. job ids are derived from the enrollment/step and execution/node so a retried trigger won't double-schedule the same work, delays get clamped and floored before they hit redis, and jobs run through a small zod-validated dispatcher registry instead of a switch. failed jobs bubble up so bullmq retries them under exponential backoff. there's decent test coverage on the delay clamping, id determinism, enqueue options and the dispatch/validation paths. i also had to add prettier-plugin-tailwindcss at the workspace root, the format:check was failing to even load it before so CI was red for everyone. handlers that touch the db (send the email, advance the enrollment) come in a follow-up.