Changing BullModule to require redis host and port env vars
This commit is contained in:
parent
4710b1026f
commit
714f74cf63
1 changed files with 2 additions and 2 deletions
|
|
@ -36,8 +36,8 @@ import { LoggerModule } from './logger/module'
|
||||||
inject: [ConfigService],
|
inject: [ConfigService],
|
||||||
useFactory: (configService: ConfigService) => ({
|
useFactory: (configService: ConfigService) => ({
|
||||||
redis: {
|
redis: {
|
||||||
host: configService.get<string>('REDIS_HOST', 'localhost'),
|
host: configService.getOrThrow<string>('REDIS_HOST'),
|
||||||
port: configService.get<number>('REDIS_PORT', 6379),
|
port: configService.getOrThrow<number>('REDIS_PORT'),
|
||||||
},
|
},
|
||||||
defaultJobOptions: {
|
defaultJobOptions: {
|
||||||
removeOnComplete: true,
|
removeOnComplete: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue