You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

27 lines
835 B

  1. import { BullModule } from '@nestjs/bull';
  2. import { Module } from '@nestjs/common';
  3. import { ConfigModule, ConfigService } from '@nestjs/config';
  4. import { ScraperMtProcessor } from './scraper-cnd-mt.processor';
  5. import { ScraperCndMtServise } from './scraper-cnd-mt.service';
  6. @Module({
  7. imports: [
  8. BullModule.registerQueueAsync({
  9. name: 'mato-grosso',
  10. imports: [ConfigModule],
  11. useFactory: async (configService: ConfigService) => ({
  12. redis: {
  13. host: configService.get('APP_REDIS_HOST'),
  14. port: +configService.get('APP_REDIS_PORT'),
  15. }
  16. }),
  17. inject: [ConfigService],
  18. })],
  19. providers: [
  20. ScraperCndMtServise,
  21. ScraperMtProcessor
  22. ],
  23. })
  24. export class ScraperCndMtModule {}