Comments (9)
Yes, I think so. With #116 it will be a better solution.
Leaving a sample of shared module for anyone who is interested:
const QueueModule = BullModule.forRoot({ // BullModule.register
name: 'test',
});
@Module({
imports: [QueueModule],
exports: [QueueModule],
})
export class SharedModule {}
from bull.
Hi @maksimkurb and thanks for reporting.
Was your sample working before NestJS 6.3.1?
from bull.
Sorry, did an example in a hurry, so I made some mistakes. Now I updated it and this is correct, that it is not working on NestJS 6.3.1, but working fine on NestJS 6.3.0
from bull.
@fwoelffel, I got it! We should add @Global()
decorator to BullModule so we can use queue in other modules. Another option is to create method BullModule.forFeature()
like in TypeORM module, but this will be a breaking change.
I will create a pull request in a couple of minutes
from bull.
I think having a SharedModule
that exports your queue, and that is imported in whichever modules where you need the queue to be injected, could solve your issue.
Would you try that? I'd prefer not to increase the code complexity as long as this can be avoided.
from bull.
I really don't like the Global
solution 😉
from bull.
SharedModule is also the solution, but then forRoot
method name is confusing. Better to be called register
like in HttpModule
from bull.
I understand that. I think the real issue here is the lack of documentation/examples.
Anyway, should we close this issue?
from bull.
I need create sessions for handle queues of inline clients, when creating a new session, I need to create a new queue with session name (dynamic) , but in nestjs docs you always know the queue name for registering and later inject it . How i can manage the dynamic creation of bull queues in nestjs?
from bull.
Related Issues (20)
- Not closing connection as expected HOT 1
- Bug Report - High Memory Usage when Providing Float to Concurrency in Bull.js Module HOT 1
- Upgrade bullmq peer dependecy to ^4.0.0 HOT 1
- How to dynamically modify the quantity of concurrency HOT 1
- Error with Bullmq Queue provider HOT 2
- 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
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.