ejhayes / nestjs-bullmq Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://www.npmjs.com/package/@ejhayes/nestjs-bullmq
License: MIT License
Home Page: https://www.npmjs.com/package/@ejhayes/nestjs-bullmq
License: MIT License
[x] Regression
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
If using this library and you have:
@Process({
name: 'NAMED_JOB_1',
concurrency: 5,
})
async processSomeJob1(job: Job<any>): Promise<void> {
// logic here
}
@Process({
name: 'NAMED_JOB_2',
concurrency: 5,
})
async processSomeJob2(job: Job<any>): Promise<void> {
// logic here
}
Then both functions will get called regardless of the job name passed in.
Specifying a named job should result in the correct processor being used. This functionality currently exists with the nestjs/bull package.
The following should work:
@Process({
name: 'A_NAMED_JOB',
concurrency: 5,
})
async processSomeJob(job: Job<any>): Promise<void> {
// logic here
}
Making this work would help ensure that this library remains a drop in replacement for the nestjs/bull package.
taskforcesh/bullmq#448 (comment)
Functionality wise, Bullv3 and BullMQ provides the same, it just that the syntax is different. In BullMQ you only define 1 processor, and then inside the processor you can choose different code paths depending on the "job.name" property. In your case this will mean a bit more of code, but named processors where causing a lot of confusion so we decided to remove the syntax sugar and made it more explicit.
For Tooling issues:
- Node version: 12
- Platform: Mac
master
branch failed. π¨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iβm sure you can fix this πͺ.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donβt help, or if this issue is reporting something you think isnβt right, you can always ask the humans behind semantic-release.
package.json
file.A package.json file at the root of your project is required to release on npm.
Please follow the npm guideline to create a valid package.json
file.
Good luck with your project β¨
Your semantic-release bot π¦π
See
nestjs-bullmq/lib/bull.providers.ts
Lines 23 to 33 in 683673e
There is an open issue (taskforcesh/bullmq#1075) to add a method of checking for existing QueueSchedulers on BullMQ. Once that feature is added, we can use it to configure QueueSchedulers as a part of this module, instead of leaving it to the user.
The module config options would take in an option for a number of schedulers. On creation, we would wait for a random time ( to avoid multiple horizontally scaled apps from checking this at the exact same time), check for the number of current schedulers, and create a scheduler if less than the settings.
Some considerations:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.