Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(event-bus-redis): Consume job correct in worker #8444

Merged
merged 5 commits into from
Aug 8, 2024

Conversation

olivermrbl
Copy link
Contributor

@olivermrbl olivermrbl commented Aug 5, 2024

We recently introduced breaking changes to the event data structure. The Redis Event Bus had not been updated to reflect those changes.

Closes FRMW-2649

Todo:

  • Will add tests in a follow-up PR

@olivermrbl olivermrbl requested a review from a team as a code owner August 5, 2024 08:22
Copy link

vercel bot commented Aug 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2024 7:54am
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Aug 7, 2024 7:54am
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 7:54am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 7:54am
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 7:54am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 7:54am
resources-docs ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 7:54am

Copy link

changeset-bot bot commented Aug 5, 2024

⚠️ No Changeset found

Latest commit: 2c4bbdd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@olivermrbl
Copy link
Contributor Author

Thx guys, will correct the tests later today :)

@olivermrbl
Copy link
Contributor Author

Guys, I had to make a few additional changes because we weren't preserving the event metadata in the BullMQ job. Consequently, the subscriber would not have access to it.

I've decided to squeeze both the event data + metadata into the job data upon insertion. Then when the worker pulls the job from the queue, we deserialize it back to the format expected by the subscriber.

Let me know if you have any comments, otherwise I'll merge :)

@carlos-r-l-rodrigues
Copy link
Contributor

LGTM

@olivermrbl olivermrbl merged commit c21407a into develop Aug 8, 2024
23 checks passed
@olivermrbl olivermrbl deleted the fix/event-bus-redis-job branch August 8, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants