import { ReposService } from './repos.service'; import { Processor, Process } from '@nestjs/bull'; import { Job } from 'bull'; import { ListLogsOption } from './models/list-logs.options'; import { LIST_LOGS_TASK } from './repos.constants'; @Processor(LIST_LOGS_TASK) export class ListLogsConsumer { constructor(private readonly service: ReposService) {} @Process() async listLogs(job: Job) { const logs = await this.service.listLogs(job.data); return logs; } }