-
Notifications
You must be signed in to change notification settings - Fork 419
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
feat(queue-events): add QueueEventsProducer for publishing custom events #2844
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, however a proper documentation chapter will be required for this, maybe as a subchapter of global events.
src/classes/queue-events.ts
Outdated
@@ -307,7 +316,8 @@ export class QueueEvents extends QueueBase { | |||
this.emit(event, id); | |||
} else { | |||
this.emit(event as any, restArgs, id); | |||
this.emit(`${event}:${restArgs.jobId}` as any, restArgs, id); | |||
if (restArgs.jobId) | |||
{this.emit(`${event}:${restArgs.jobId}` as any, restArgs, id);} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code format here looks strange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah for some reason, lint didn't get applied
03f409b
to
5cab36e
Compare
Very cool, subscribed to this one for when it drops. Did a similar setup to the "steps" pattern in the docs but without an event for the step changes, it's a bit clunky at parts. thanks for this. |
5cab36e
to
c12d93e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
# [5.25.0](v5.24.0...v5.25.0) (2024-11-06) ### Features * **queue-events:** add QueueEventsProducer for publishing custom events ([#2844](#2844)) ([5eb03cd](5eb03cd))
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [bullmq](https://bullmq.io/) ([source](https://github.com/taskforcesh/bullmq)) | dependencies | minor | [`5.23.1` -> `5.25.0`](https://renovatebot.com/diffs/npm/bullmq/5.23.1/5.25.0) | --- ### Release Notes <details> <summary>taskforcesh/bullmq (bullmq)</summary> ### [`v5.25.0`](https://github.com/taskforcesh/bullmq/releases/tag/v5.25.0) [Compare Source](taskforcesh/bullmq@v5.24.0...v5.25.0) ##### Features - **queue-events:** add QueueEventsProducer for publishing custom events ([#​2844](taskforcesh/bullmq#2844)) ([5eb03cd](taskforcesh/bullmq@5eb03cd)) ### [`v5.24.0`](https://github.com/taskforcesh/bullmq/releases/tag/v5.24.0) [Compare Source](taskforcesh/bullmq@v5.23.1...v5.24.0) ##### Features - **flows:** add telemetry support ([#​2879](taskforcesh/bullmq#2879)) ([5ed154b](taskforcesh/bullmq@5ed154b)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xNDIuNyIsInVwZGF0ZWRJblZlciI6IjM4LjE0Mi43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/298 Reviewed-by: Alexandre Soro <code@soro.dev> Co-authored-by: renovate <renovate@git.tristess.app> Co-committed-by: renovate <renovate@git.tristess.app>
Documentation is missing
ref #2759