2021-03-01 18:14:13 +08:00
|
|
|
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';
|
2021-03-04 11:43:23 +08:00
|
|
|
import { ReposModule } from '../repos/repos.module';
|
2021-03-06 12:23:55 +08:00
|
|
|
import { RedisModule } from 'nestjs-redis';
|
|
|
|
import { BullModule } from '@nestjs/bull';
|
2021-03-12 23:00:12 +08:00
|
|
|
import { PipelineTaskConsumer } from './pipeline-task.consumer';
|
2021-04-04 00:36:58 +08:00
|
|
|
import { PIPELINE_TASK_QUEUE } from './pipeline-tasks.constants';
|
2021-03-15 13:30:52 +08:00
|
|
|
import { PipelineTaskLogsService } from './pipeline-task-logs.service';
|
2021-04-04 00:36:58 +08:00
|
|
|
import { PubSubModule } from '../commons/pub-sub/pub-sub.module';
|
2021-03-01 18:14:13 +08:00
|
|
|
|
|
|
|
@Module({
|
2021-03-06 12:23:55 +08:00
|
|
|
imports: [
|
|
|
|
TypeOrmModule.forFeature([PipelineTask, Pipeline]),
|
2021-03-27 15:34:08 +08:00
|
|
|
BullModule.registerQueue({
|
|
|
|
name: PIPELINE_TASK_QUEUE,
|
|
|
|
}),
|
2021-04-04 00:36:58 +08:00
|
|
|
PubSubModule.forFeature(),
|
2021-03-06 12:23:55 +08:00
|
|
|
RedisModule,
|
|
|
|
ReposModule,
|
|
|
|
],
|
2021-03-12 23:00:12 +08:00
|
|
|
providers: [
|
|
|
|
PipelineTasksService,
|
|
|
|
PipelineTasksResolver,
|
|
|
|
PipelineTaskConsumer,
|
2021-03-15 13:30:52 +08:00
|
|
|
PipelineTaskLogsService,
|
2021-03-12 23:00:12 +08:00
|
|
|
],
|
2021-03-28 10:24:12 +08:00
|
|
|
exports: [PipelineTasksService],
|
2021-03-01 18:14:13 +08:00
|
|
|
})
|
|
|
|
export class PipelineTasksModule {}
|