rotate-consumer.ts 498 B

123456789101112131415161718192021222324
  1. import { OnQueueActive, Process, Processor } from '@nestjs/bull';
  2. import { Job } from 'bull';
  3. @Processor('rotate')
  4. export class RotateConsumer {
  5. @Process()
  6. async processFrame(job: Job<unknown>) {
  7. // const progress = 0;
  8. // for (i = 0; i < 100; i++) {
  9. // b);
  10. console.log('job', job);
  11. debugger;
  12. // }
  13. return {};
  14. }
  15. @OnQueueActive()
  16. onActive(job: Job) {
  17. console.log(
  18. `Processing job ${job.id} of type ${job.name} with data ${job.data}...`,
  19. );
  20. }
  21. }