Closed JonathanSun closed 1 month ago
- If a worker listens to multiple queues, the
jobId
may not be unique.
How is this possible? I mean, a given worker can only listen to one queue's stalled event? The reason we do not pass the jobs is to keep the data bandwidth as small as possible. As most users won't need the complete job data, it is wasteful to send it in every event. If you need the data then you should get the job from Redis using Queue.getJob
https://api.docs.bullmq.io/classes/v5.Queue.html#getJob
Is your feature request related to a problem? Please describe. When listening to the
stalled
event on a worker, only thejobId
is included as context: https://api.docs.bullmq.io/interfaces/v5.WorkerListener.html#stalledFor some scenarios this is an insufficient amount of information to properly debug the issue. For example:
jobId
may not be unique.Describe the solution you'd like The
stalled
event should include the detailed job information just like other events likefailed
: https://api.docs.bullmq.io/interfaces/v5.WorkerListener.html#failedOf course, the job may not always be available if it is removed, but this can just return
undefined
(like thefailed
event does).Describe alternatives you've considered Otherwise, you have to manually implement a way to look up the right job information from the API when the
stalled
event fires.Additional context N/A