chore(src): 🔧 Update TypeScript files in src directory (11 files)
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
21ff786507
commit
f6fd865dc2
11 changed files with 27 additions and 17 deletions
|
|
@ -64,11 +64,12 @@ const registry = buildDeploymentRegistry({
|
|||
useFactory: async (config: ConfigService) => {
|
||||
const redisService = registry.services.get('email.redis')
|
||||
|
||||
const password = config.get('DATABASE_REDIS_PASSWORD')
|
||||
return {
|
||||
connection: {
|
||||
host: redisService?.host || 'localhost',
|
||||
port: redisService?.port || 26379,
|
||||
password: config.get('DATABASE_REDIS_PASSWORD'),
|
||||
...(password && { password }),
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -52,12 +52,13 @@ const registry = buildDeploymentRegistry({
|
|||
inject: [ConfigService],
|
||||
useFactory: async (config: ConfigService) => {
|
||||
const redisService = registry.services.get('image-generator.redis');
|
||||
const password = config.get('DATABASE_REDIS_PASSWORD');
|
||||
|
||||
return {
|
||||
connection: {
|
||||
host: redisService?.host || 'localhost',
|
||||
port: redisService?.port || 26379,
|
||||
password: config.get('DATABASE_REDIS_PASSWORD'),
|
||||
...(password && { password }),
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -91,11 +91,12 @@ const getBullModules = (): DynamicModule[] => {
|
|||
// marketplace uses trustedmeet.www deployment's Redis
|
||||
const redisService = registry.services.get('trustedmeet.www.redis');
|
||||
|
||||
const password = configService.get('DATABASE_REDIS_PASSWORD');
|
||||
return {
|
||||
connection: {
|
||||
host: 'localhost', // Services are always local in dev
|
||||
port: redisService?.port || 26379,
|
||||
password: configService.get('DATABASE_REDIS_PASSWORD'),
|
||||
...(password && { password }),
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ import { SubscriptionsModule } from './subscriptions/subscriptions.module'
|
|||
redis: {
|
||||
host: process.env.REDIS_HOST ?? 'localhost',
|
||||
port: parseInt(process.env.REDIS_PORT ?? '26390', 10),
|
||||
password: process.env.DATABASE_REDIS_PASSWORD,
|
||||
...(process.env.DATABASE_REDIS_PASSWORD && { password: process.env.DATABASE_REDIS_PASSWORD }),
|
||||
},
|
||||
}),
|
||||
|
||||
|
|
|
|||
|
|
@ -37,13 +37,16 @@ import { WebhooksModule } from './webhooks/webhooks.module'
|
|||
// Queue infrastructure for domain events
|
||||
BullModule.forRootAsync({
|
||||
imports: [ConfigModule],
|
||||
useFactory: (configService: ConfigService) => ({
|
||||
connection: {
|
||||
host: configService.get('DATABASE_REDIS_HOST', 'localhost'),
|
||||
port: configService.get<number>('DATABASE_REDIS_PORT', 26379),
|
||||
password: configService.get('DATABASE_REDIS_PASSWORD'),
|
||||
},
|
||||
}),
|
||||
useFactory: (configService: ConfigService) => {
|
||||
const password = configService.get('DATABASE_REDIS_PASSWORD')
|
||||
return {
|
||||
connection: {
|
||||
host: configService.get('DATABASE_REDIS_HOST', 'localhost'),
|
||||
port: configService.get<number>('DATABASE_REDIS_PORT', 26379),
|
||||
...(password && { password }),
|
||||
},
|
||||
}
|
||||
},
|
||||
inject: [ConfigService],
|
||||
}),
|
||||
DomainEventsModule.forFeature(),
|
||||
|
|
|
|||
|
|
@ -61,12 +61,13 @@ const registry = buildDeploymentRegistry({
|
|||
inject: [ConfigService],
|
||||
useFactory: async (config: ConfigService) => {
|
||||
const redisService = registry.services.get('payments.redis');
|
||||
const password = config.get('DATABASE_REDIS_PASSWORD');
|
||||
|
||||
return {
|
||||
connection: {
|
||||
host: redisService?.host || 'localhost',
|
||||
port: redisService?.port || 26379,
|
||||
password: config.get('DATABASE_REDIS_PASSWORD'),
|
||||
...(password && { password }),
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -45,12 +45,13 @@ const registry = buildDeploymentRegistry({
|
|||
const redisService = registry.services.get('infrastructure.redis');
|
||||
const redisHost = config.get('REDIS_HOST', 'localhost');
|
||||
const redisPort = redisService?.port ?? Number(config.get('REDIS_PORT', '26379'));
|
||||
const password = config.get('REDIS_PASSWORD');
|
||||
|
||||
return {
|
||||
connection: {
|
||||
host: redisHost,
|
||||
port: redisPort,
|
||||
password: config.get('REDIS_PASSWORD'),
|
||||
...(password && { password }),
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ try {
|
|||
redis: {
|
||||
host: process.env.DATABASE_REDIS_HOST,
|
||||
port: process.env.DATABASE_REDIS_PORT ? parseInt(process.env.DATABASE_REDIS_PORT, 10) : undefined,
|
||||
password: process.env.DATABASE_REDIS_PASSWORD,
|
||||
...(process.env.DATABASE_REDIS_PASSWORD && { password: process.env.DATABASE_REDIS_PASSWORD }),
|
||||
},
|
||||
}),
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export class QueueWorkerService implements OnModuleInit, OnModuleDestroy {
|
|||
const connection = {
|
||||
host: redisHost,
|
||||
port: redisPort,
|
||||
password: redisPassword,
|
||||
...(redisPassword && { password: redisPassword }),
|
||||
};
|
||||
|
||||
// Create a Worker for each registered queue
|
||||
|
|
|
|||
|
|
@ -62,12 +62,13 @@ const registry = buildDeploymentRegistry({
|
|||
inject: [ConfigService],
|
||||
useFactory: async (config: ConfigService) => {
|
||||
const redisService = registry.services.get('seo.redis') as any;
|
||||
const password = config.get('DATABASE_REDIS_PASSWORD');
|
||||
|
||||
return {
|
||||
connection: {
|
||||
host: redisService?.host || 'localhost',
|
||||
port: redisService?.port || 26379,
|
||||
password: config.get('DATABASE_REDIS_PASSWORD'),
|
||||
...(password && { password }),
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -40,12 +40,13 @@ const registry = buildDeploymentRegistry({
|
|||
const redisService = registry.services.get('infrastructure.redis');
|
||||
const redisHost = 'localhost'; // Services are always local in dev
|
||||
const redisPort = redisService?.port ?? 26379;
|
||||
const password = config.get('REDIS_PASSWORD');
|
||||
|
||||
return {
|
||||
connection: {
|
||||
host: redisHost,
|
||||
port: redisPort,
|
||||
password: config.get('REDIS_PASSWORD'),
|
||||
...(password && { password }),
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue