From ef47f8049e1b39644ae0cac5c6a7d2f0eba6d824 Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Sun, 28 Mar 2021 19:38:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(queue):=20=E4=BF=AE=E5=A4=8D=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E9=98=9F=E5=88=97=E6=9C=AA=E4=BD=BF=E7=94=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84reids.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.module.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/app.module.ts b/src/app.module.ts index 105a5a3..662f01d 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -15,6 +15,7 @@ import { WebhooksModule } from './webhooks/webhooks.module'; import { RawBodyMiddleware } from './commons/middlewares/raw-body.middleware'; import { GiteaWebhooksController } from './webhooks/gitea-webhooks.controller'; import { ParseBodyMiddleware } from './commons/middlewares/parse-body.middleware'; +import { BullModule } from '@nestjs/bull'; @Module({ imports: [ @@ -45,6 +46,17 @@ import { ParseBodyMiddleware } from './commons/middlewares/parse-body.middleware }), inject: [ConfigService], }), + BullModule.forRootAsync({ + imports: [ConfigModule], + useFactory: (configService: ConfigService) => ({ + redis: { + host: configService.get('db.redis.host', 'localhost'), + port: configService.get('db.redis.port', 6379), + password: configService.get('db.redis.password', ''), + }, + }), + inject: [ConfigService], + }), ProjectsModule, ReposModule, PipelinesModule,