mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
feat(core): Make Postgres connection timeout configurable (#10670)
This commit is contained in:
parent
e318a6323a
commit
81540318b4
|
@ -75,6 +75,10 @@ class PostgresConfig {
|
|||
@Env('DB_POSTGRESDB_POOL_SIZE')
|
||||
poolSize: number = 2;
|
||||
|
||||
/** Postgres connection timeout (ms) */
|
||||
@Env('DB_POSTGRESDB_CONNECTION_TIMEOUT')
|
||||
connectionTimeoutMs: number = 1000;
|
||||
|
||||
@Nested
|
||||
ssl: PostgresSSLConfig;
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ describe('GlobalConfig', () => {
|
|||
poolSize: 2,
|
||||
port: 5432,
|
||||
schema: 'public',
|
||||
connectionTimeoutMs: 1000,
|
||||
ssl: {
|
||||
ca: '',
|
||||
cert: '',
|
||||
|
|
|
@ -104,6 +104,7 @@ const getPostgresConnectionOptions = (): PostgresConnectionOptions => {
|
|||
schema: postgresConfig.schema,
|
||||
poolSize: postgresConfig.poolSize,
|
||||
migrations: postgresMigrations,
|
||||
connectTimeoutMS: postgresConfig.connectionTimeoutMs,
|
||||
ssl,
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue