Merge pull request #1785 from pikasTech/fix/webprobe-db-pool-timeout-1770
fix: 调整 v03 Postgres pool timeout
This commit is contained in:
@@ -262,6 +262,10 @@ lanes:
|
|||||||
serviceName: g14-platform-postgres
|
serviceName: g14-platform-postgres
|
||||||
endpointAddress: 10.42.0.1
|
endpointAddress: 10.42.0.1
|
||||||
port: 5432
|
port: 5432
|
||||||
|
runtimeStore:
|
||||||
|
postgres:
|
||||||
|
poolMax: 40
|
||||||
|
connectionTimeoutMs: 5000
|
||||||
envReuseServices:
|
envReuseServices:
|
||||||
- hwlab-cloud-api
|
- hwlab-cloud-api
|
||||||
- hwlab-user-billing
|
- hwlab-user-billing
|
||||||
|
|||||||
@@ -991,6 +991,9 @@ function runtimeStoreEnvForProfile(deploy, profile, serviceId) {
|
|||||||
if (!postgres || typeof postgres !== "object" || Array.isArray(postgres)) return {};
|
if (!postgres || typeof postgres !== "object" || Array.isArray(postgres)) return {};
|
||||||
const env = {};
|
const env = {};
|
||||||
if (Number.isInteger(postgres.poolMax)) env.HWLAB_CLOUD_DB_POOL_MAX = String(postgres.poolMax);
|
if (Number.isInteger(postgres.poolMax)) env.HWLAB_CLOUD_DB_POOL_MAX = String(postgres.poolMax);
|
||||||
|
if (Number.isInteger(postgres.connectionTimeoutMs)) {
|
||||||
|
env.HWLAB_CLOUD_DB_PROBE_TIMEOUT_MS = String(postgres.connectionTimeoutMs);
|
||||||
|
}
|
||||||
return env;
|
return env;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user