fix(queue): 修复消息队列未使用配置的reids.
This commit is contained in:
parent
da6bc9a068
commit
ef47f8049e
@ -15,6 +15,7 @@ import { WebhooksModule } from './webhooks/webhooks.module';
|
|||||||
import { RawBodyMiddleware } from './commons/middlewares/raw-body.middleware';
|
import { RawBodyMiddleware } from './commons/middlewares/raw-body.middleware';
|
||||||
import { GiteaWebhooksController } from './webhooks/gitea-webhooks.controller';
|
import { GiteaWebhooksController } from './webhooks/gitea-webhooks.controller';
|
||||||
import { ParseBodyMiddleware } from './commons/middlewares/parse-body.middleware';
|
import { ParseBodyMiddleware } from './commons/middlewares/parse-body.middleware';
|
||||||
|
import { BullModule } from '@nestjs/bull';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
@ -45,6 +46,17 @@ import { ParseBodyMiddleware } from './commons/middlewares/parse-body.middleware
|
|||||||
}),
|
}),
|
||||||
inject: [ConfigService],
|
inject: [ConfigService],
|
||||||
}),
|
}),
|
||||||
|
BullModule.forRootAsync({
|
||||||
|
imports: [ConfigModule],
|
||||||
|
useFactory: (configService: ConfigService) => ({
|
||||||
|
redis: {
|
||||||
|
host: configService.get<string>('db.redis.host', 'localhost'),
|
||||||
|
port: configService.get<number>('db.redis.port', 6379),
|
||||||
|
password: configService.get<string>('db.redis.password', ''),
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
inject: [ConfigService],
|
||||||
|
}),
|
||||||
ProjectsModule,
|
ProjectsModule,
|
||||||
ReposModule,
|
ReposModule,
|
||||||
PipelinesModule,
|
PipelinesModule,
|
||||||
|
Loading…
Reference in New Issue
Block a user