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-03-06 12:23:55 +08:00
|
|
|
import {
|
|
|
|
PIPELINE_TASK_QUEUE,
|
|
|
|
PIPELINE_TASK_LOG_QUEUE,
|
|
|
|
} from './pipeline-tasks.constants';
|
2021-03-01 18:14:13 +08:00
|
|
|
|
|
|
|
@Module({
|
2021-03-06 12:23:55 +08:00
|
|
|
imports: [
|
|
|
|
TypeOrmModule.forFeature([PipelineTask, Pipeline]),
|
|
|
|
BullModule.registerQueue(
|
|
|
|
{
|
|
|
|
name: PIPELINE_TASK_QUEUE,
|
|
|
|
},
|
|
|
|
{ name: PIPELINE_TASK_LOG_QUEUE },
|
|
|
|
),
|
|
|
|
RedisModule,
|
|
|
|
ReposModule,
|
|
|
|
],
|
2021-03-12 23:00:12 +08:00
|
|
|
providers: [
|
|
|
|
PipelineTasksService,
|
|
|
|
PipelineTasksResolver,
|
|
|
|
PipelineTaskConsumer,
|
|
|
|
],
|
2021-03-01 18:14:13 +08:00
|
|
|
})
|
|
|
|
export class PipelineTasksModule {}
|