bull
bull copied to clipboard
Missing WorkerOptions types on BullQueueAdvancedProcessor and BullQueueAdvancedSeparateProcessor
Is there an existing issue for this?
- [X] I have searched the existing issues
Current behavior
Hi,
Currently, additional WorkerOptions from BullMQ are not presented in these advanced queue processor types:
https://github.com/nestjs/bull/blob/5d43350da7fc06c0bcb5e866f518f8676743c86d/packages/bull/lib/interfaces/bull.interfaces.ts#L6-L16
So if you try to use additional options such as limiter: {}
, the types aren't present. However it works just fine since the options are just relayed to the Worker class:
https://github.com/nestjs/bull/blob/5d43350da7fc06c0bcb5e866f518f8676743c86d/packages/bullmq/lib/bull.providers.ts#L37-L42
We could just extend the interface here: https://github.com/taskforcesh/bullmq/blob/b28981938e8a4504905363551544633d9734e20f/src/interfaces/worker-options.ts#L16
If this looks good, I can put up a PR. Thank you for all your work.
Minimum reproduction code
N/A
Package version
10.0.1
Bull version
4.17.0
NestJS version
10.3.0
Node.js version
18.19.0
In which operating systems have you tested?
- [X] macOS
- [ ] Windows
- [ ] Linux
Other
No response
Would you like to create a PR for this issue?
Let's track this here https://github.com/nestjs/bull/pull/2124