123456789101112131415161718192021222324 |
- 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);
- debugger;
- // }
- return {};
- }
- @OnQueueActive()
- onActive(job: Job) {
- console.log(
- `Processing job ${job.id} of type ${job.name} with data ${job.data}...`,
- );
- }
- }
|