fennec-be/src/pipeline-tasks/pipeline-tasks.module.ts

34 lines
1.1 KiB
TypeScript
Raw Normal View History

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';
2021-03-06 12:23:55 +08:00
import { RedisModule } from 'nestjs-redis';
import { BullModule } from '@nestjs/bull';
import { PipelineTaskConsumer } from './pipeline-task.consumer';
import { PIPELINE_TASK_QUEUE } from './pipeline-tasks.constants';
import { PipelineTaskLogsService } from './pipeline-task-logs.service';
import { PubSubModule } from '../commons/pub-sub/pub-sub.module';
@Module({
2021-03-06 12:23:55 +08:00
imports: [
TypeOrmModule.forFeature([PipelineTask, Pipeline]),
BullModule.registerQueue({
name: PIPELINE_TASK_QUEUE,
}),
PubSubModule.forFeature(),
2021-03-06 12:23:55 +08:00
RedisModule,
ReposModule,
],
providers: [
PipelineTasksService,
PipelineTasksResolver,
PipelineTaskConsumer,
PipelineTaskLogsService,
],
exports: [PipelineTasksService],
})
export class PipelineTasksModule {}