import { Module } from '@nestjs/common'; import { PipelineTasksService } from './pipeline-tasks.service'; import { PipelineTasksResolver } from './pipeline-tasks.resolver'; import { TypeOrmModule } from '@nestjs/typeorm'; import { PipelineTask } from './pipeline-task.entity'; import { Pipeline } from '../pipelines/pipeline.entity'; import { ReposModule } from '../repos/repos.module'; import { RedisModule } from 'nestjs-redis'; import { BullModule } from '@nestjs/bull'; import { PipelineTaskConsumer } from './pipeline-task.consumer'; import { PIPELINE_TASK_QUEUE, PIPELINE_TASK_LOG_QUEUE, PIPELINE_TASK_LOG_PUBSUB, } from './pipeline-tasks.constants'; import { PipelineTaskLogsService } from './pipeline-task-logs.service'; import { PubSub } from 'apollo-server-express'; @Module({ imports: [ TypeOrmModule.forFeature([PipelineTask, Pipeline]), BullModule.registerQueue({ name: PIPELINE_TASK_QUEUE, }), RedisModule, ReposModule, ], providers: [ PipelineTasksService, PipelineTasksResolver, PipelineTaskConsumer, PipelineTaskLogsService, { provide: Symbol(PIPELINE_TASK_LOG_PUBSUB), useValue: new PubSub(), }, ], }) export class PipelineTasksModule {}