import { BullModule } from '@nestjs/bull'; import { Module } from '@nestjs/common'; import { ConfigModule, ConfigService } from '@nestjs/config'; import { ScraperMtProcessor } from './scraper-cnd-mt.processor'; import { ScraperCndMtServise } from './scraper-cnd-mt.service'; @Module({ imports: [ BullModule.registerQueueAsync({ name: 'mato-grosso', imports: [ConfigModule], useFactory: async (configService: ConfigService) => ({ redis: { host: configService.get('APP_REDIS_HOST'), port: +configService.get('APP_REDIS_PORT'), } }), inject: [ConfigService], })], providers: [ ScraperCndMtServise, ScraperMtProcessor ], }) export class ScraperCndMtModule {}