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.

16 lines
474 B

  1. import { Process, Processor } from "@nestjs/bull";
  2. import { Job } from 'bull';
  3. import { ScraperCndMtServise } from "./scraper-cnd-mt.service";
  4. @Processor('mato-grosso')
  5. export class ScraperMtProcessor {
  6. constructor(private readonly scraperCndMtService: ScraperCndMtServise) {}
  7. @Process({ name: 'mato-grosso', concurrency: 1})
  8. handler(job: Job) {
  9. const { inscricao } = job.data;
  10. return this.scraperCndMtService.scraperCndMt(inscricao);
  11. }
  12. }