import { Module } from '@nestjs/common';
import { BullModule } from '@nestjs/bullmq';
import { VideoGenerationProducer } from './video-generation.producer';

@Module({
  imports: [
    BullModule.registerQueue({
      name: 'video-generation',
      defaultJobOptions: {
        attempts: 3,
        backoff: { type: 'exponential', delay: 5000 },
      },
    }),
  ],
  providers: [VideoGenerationProducer],
  exports: [VideoGenerationProducer],
})
export class VideoQueueModule {}
