import { Process , Processor , OnQueueActive } from '@nestjs/bull' ; import { Logger } from '@nestjs/common' ; import { Job } from 'bull' ; @ Processor ( 'audio' ) export class AudioProcessor { private readonly logger = new Logger ( AudioProcessor . name ) ; @ OnQueueActive ( ) onActive ( job ) { this . logger . debug ( `Processing job ${ job . id } of type ${ job . name } with data ${ job . data }...` ) ; } @ Process ( 'transcode' ) handleTranscode ( job ) { this . logger . debug ( 'Start transcoding...' ) ; this . logger . debug ( job . data ) ; this . logger . debug ( 'Transcoding completed' ) ; } }