Changing BullModule to require redis host and port env vars

This commit is contained in:
Collin Duncan 2023-06-28 15:17:49 +02:00
parent 4710b1026f
commit 714f74cf63
No known key found for this signature in database

View file

@ -36,8 +36,8 @@ import { LoggerModule } from './logger/module'
inject: [ConfigService],
useFactory: (configService: ConfigService) => ({
redis: {
host: configService.get<string>('REDIS_HOST', 'localhost'),
port: configService.get<number>('REDIS_PORT', 6379),
host: configService.getOrThrow<string>('REDIS_HOST'),
port: configService.getOrThrow<number>('REDIS_PORT'),
},
defaultJobOptions: {
removeOnComplete: true,