Comments (21)
Feel free to check out #720 if you want to test bullmq.
from bull.
Thank you for sharing your thoughts.
@Queue('example', { ...other queue options })
This decorator looks promising. A way to declaratively define a queue would be nice.
... extends AbstractQueue {
// provided by AbstractQueue for full queue control if needed
private readonly queue: BullQueue;
Using DI with @InjectQueue
seems to be more testable & cleaner in comparison to the proposed approach (with inheritance and abstract classes).
// Job decorator creates a job and adds it to bull queue
// with data returned from the method
@Job()
async task1(param1: string, param2: number): Promise<Task1Data> {
return {
param1,
param2
}
}
I'm not sure what would be the potential use-case for statically created one-time jobs that are added to the queue on application bootstrap and how - most importantly - this decorator simplifies this operation (instead of simply calling .add()
explicitly).
// RepeatableJob decorator allows to automatically register the job
// in the bull queue and acts as a guard to disallow calling method
@RepeatableJob({
repeat: { cron: '* * * * *' },
attempts: 1,
})
This looks great though. I'm guessing having @Job
would be nice for the sake of consistency then?
@Process(ExampleQueue.task1)
This is impossible. task1
would have to be defined as a static method which doesn't make any sense.
async task2(data: Task2Data, @InjectJob() job: Job<Task2Data>)
I'm not a big fan of this decorator either. I think we can just pass 2 arguments by default (job
would be optional in this case).
from bull.
I might be late to this thread, but I found this BullMQ blog post helpful to talk about how BullMQ is really the same team and just the next gen of bull: https://medium.com/@rockstudillo/beta-release-of-bullmq-4-0-867960aec51.
from bull.
@stavalfi Are there issues in bullmq repo for those bugs or any other evidence? I'm preparing a PR for the switch for this repo so i'd love to know more
from bull.
as i remember, there is no such issue. i will try to find a time in the next 2-3 days to reproduce it in small repo.
from bull.
hi, @kamilmysliwiec , thank you for your response, I have some thoughts and suggestions based on your feedback, but I'm in the middle of moving out, please don't close this issue, I'll write my comments at the end of next week.
from bull.
@kamilmysliwiec this package sound great... One question off topic, why this use the old bull
package instead the new bullmq
?
from bull.
BullMq, which is the Beta repo for Bull 4.0, is available. I believe that any changes to this API should be built on top of the newer version.
from bull.
@VictorGaiva well i think BullMQ was released under v1 and not as v4... The latest release is 1.6.7 from 6 days ago... https://github.com/taskforcesh/bullmq/releases
from bull.
@gperdomor I believe BullMQ is actually Bull 4.
@VictorGaiva Good catch. Maybe we should keep this in mind: https://docs.bullmq.io/bull-3.x-migration/compatibility-class
from bull.
@fwoelffel yes, agreed
from bull.
@fwoelffel It seems to be. I found the repo directly from main README:
BullMQ 4 Beta
If you want to start using the next major version of Bull you are welcome to the new repo here
from bull.
any updates here?
from bull.
@brianschardt You can feel free to contribute in any way to the repo. We need someone to kickstart it
from bull.
The proposed cronjob abstraction is far better than the current workaround.
I have to implement the OnApplicationBootstrap
interface myself to enqueue the job after Nest's initialization is completed.
onApplicationBootstrap(): void {
this.userCleanupQueue.add(null, { repeat: { cron: "0 1 * * *" } });
}
from bull.
bullmq is not production ready. sometimes jobs are not processes. the reproduction is not that easy and i don't have time for it but there are problems. bullmq needs more time.
from bull.
Any update on this ?
I am happy to beta test the new version.
from bull.
sorry, don't wait for me. I don't have time to reproduce this. and maybe by now they already fixed the bug I faced.
from bull.
Any plan move to bullmq?
from bull.
@xiaoyu-tamu #754
There is a pretty fresh mention from @kamilmysliwiec on what may happen.
But honestly, if you use @nestjs/bull + bullmq instead of the bull it should work. I didn't test all the features but "Queue" class seems to work on the most of the features. And that is from last 2 weeks when I spent it on writting a queue feature in Nestjs project.
from bull.
from bull.
Related Issues (20)
- Nestjs bullmq worker processor don't works with jest HOT 1
- Get process and processer metadata HOT 1
- Support processor with observables HOT 1
- Support multiple rate limits HOT 1
- Processors with multiple processes inconsistently process jobs HOT 1
- BullModule.registerQueue duplicates Module load HOT 2
- Global concurrency limit HOT 5
- Not initialising the processor with decorator HOT 1
- Facilitate queue metrics collection HOT 2
- Bull does paralel job when in processor implemented more processes. HOT 1
- Bull events + Nestjs request scoped dependencies
- Support BullMQ v5.0.0 HOT 3
- Bull Module not connecting as expected HOT 1
- Missing WorkerOptions types on BullQueueAdvancedProcessor and BullQueueAdvancedSeparateProcessor HOT 1
- options.family is not cast to number if given in REDIS_URL HOT 1
- Bull support for durable request scoped processors. HOT 4
- Give ability to disable job processing in `BullModule.forRoot` method HOT 1
- Mismatch with bull HOT 2
- NestJS Bull appears to be utilizing Upstash Redis unnecessarily. HOT 1
- Controls for nestjs/bullmq processors in request-scoped providers HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bull.