Я следую do c, чтобы начать использовать очередь. Я установил @nestjs/bull
, bull
, @types/bull
зависимости. А вот мой app.module.ts
:
@Module({
imports: [
ConfigModule.forRoot({
load: [configuration],
}),
BullModule.registerQueue({
name: 'create_checkin',
redis: {
host: 'localhost',
port: 6379,
},
}),
EventModule,
],
})
export class AppModule {}
Я импортировал BullModule в модуль root. И вот мой event.service.ts
:
@Injectable()
export class EventService {
constructor(
@InjectQueue('create_checkin') private readonly createCheckinQueue: Queue,
) {
}
}
И когда я запускаю сервер, я получаю следующее сообщение об ошибке:
Nest can't resolve dependencies of the EventService
Please make sure that the argument BullQueue_create_checkin at index [0] is available in the EventModule context.
Я не знаю, какой шаг я сделал неправильно. Кто-нибудь может мне помочь?