import { OnQueueActive, Process, Processor } from '@nestjs/bull';
import { Job } from 'bull';

@Processor('rotate')
export class RotateConsumer {
  @Process()
  async processFrame(job: Job<unknown>) {
    // const progress = 0;
    // for (i = 0; i < 100; i++) {
    // b);
    console.log('job', job);
    // }
    return {};
  }

  @OnQueueActive()
  onActive(job: Job) {
    console.log(
      `Processing job ${job.id} of type ${job.name} with data ${job.data}...`,
    );
  }
}
