import { InjectQueue } from '@nestjs/bull' ; import { Controller , Post } from '@nestjs/common' ; import { Queue } from 'bull' ; @ Controller ( 'audio' ) export class AudioController { constructor ( @ InjectQueue ( 'audio' ) private readonly audioQueue ) { } @ Post ( 'transcode' ) async transcode ( ) { await this . audioQueue . add ( 'transcode' , { file : 'audio.mp3' , } , { delay : 1000 } ) ; } }