fix(hwlab): tune d601 v03 db pool config
This commit is contained in:
@@ -81,6 +81,7 @@ export interface HwlabRuntimeExternalPostgresSpec {
|
||||
|
||||
export interface HwlabRuntimePostgresStoreSpec {
|
||||
readonly poolMax: number;
|
||||
readonly connectionTimeoutMs?: number;
|
||||
}
|
||||
|
||||
export interface HwlabRuntimeStoreSpec {
|
||||
@@ -587,7 +588,16 @@ function runtimeStoreConfig(value: unknown, path: string): HwlabRuntimeStoreSpec
|
||||
const raw = asRecord(value, path);
|
||||
const postgres = raw.postgres === undefined ? undefined : asRecord(raw.postgres, `${path}.postgres`);
|
||||
return {
|
||||
...(postgres === undefined ? {} : { postgres: { poolMax: numberField(postgres, "poolMax", `${path}.postgres`) } }),
|
||||
...(postgres === undefined
|
||||
? {}
|
||||
: {
|
||||
postgres: {
|
||||
poolMax: numberField(postgres, "poolMax", `${path}.postgres`),
|
||||
...(postgres.connectionTimeoutMs === undefined
|
||||
? {}
|
||||
: { connectionTimeoutMs: numberField(postgres, "connectionTimeoutMs", `${path}.postgres`) }),
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user