import { Module } from '@nestjs/common';
import { PrismaService } from '../../prisma/prisma.service';
import { BackgroundJobWorker } from './background-job.worker';
import { JobLockService } from './job-lock.service';
import { JobsService } from './jobs.service';
import { JOBS_PRISMA } from './jobs.types';

@Module({
  providers: [
    { provide: JOBS_PRISMA, useExisting: PrismaService },
    JobsService,
    JobLockService,
    BackgroundJobWorker,
  ],
  exports: [JobsService, JobLockService, BackgroundJobWorker],
})
export class JobsModule {}
