Add different max for private db connection

This commit is contained in:
Ajay
2023-07-24 13:56:09 -04:00
parent 79515ccc8b
commit 2fc31655ff
3 changed files with 3 additions and 0 deletions

View File

@@ -98,6 +98,7 @@ addDefaults(config, {
fallbackOnFail: true, fallbackOnFail: true,
stopRetryThreshold: 800 stopRetryThreshold: 800
}, },
postgresPrivateMax: 10,
dumpDatabase: { dumpDatabase: {
enabled: false, enabled: false,
minTimeBetweenMs: 180000, minTimeBetweenMs: 180000,

View File

@@ -30,6 +30,7 @@ if (config.postgres?.enabled) {
createDbIfNotExists: config.createDatabaseIfNotExist, createDbIfNotExists: config.createDatabaseIfNotExist,
postgres: { postgres: {
...config.postgres, ...config.postgres,
max: config.postgresPrivateMax ?? config.postgres.max,
database: "privateDB" database: "privateDB"
}, },
postgresReadOnly: config.postgresReadOnly ? { postgresReadOnly: config.postgresReadOnly ? {

View File

@@ -84,6 +84,7 @@ export interface SBSConfig {
maxRewardTimePerSegmentInSeconds?: number; maxRewardTimePerSegmentInSeconds?: number;
postgres?: CustomWritePostgresConfig; postgres?: CustomWritePostgresConfig;
postgresReadOnly?: CustomPostgresReadOnlyConfig; postgresReadOnly?: CustomPostgresReadOnlyConfig;
postgresPrivateMax?: number;
dumpDatabase?: DumpDatabase; dumpDatabase?: DumpDatabase;
diskCacheURL: string; diskCacheURL: string;
crons: CronJobOptions; crons: CronJobOptions;