Allow configuring the connection pool size

Closes #3165
This commit is contained in:
rijkvanzanten
2021-02-22 20:19:08 -05:00
parent f0ed48d344
commit 81bb7cfa53
2 changed files with 12 additions and 0 deletions

View File

@@ -14,8 +14,11 @@ const connectionConfig: Record<string, any> = getConfigFromEnv('DB_', [
'DB_CLIENT',
'DB_SEARCH_PATH',
'DB_CONNECTION_STRING',
'DB_POOL',
]);
const poolConfig = getConfigFromEnv('DB_POOL');
const knexConfig: Config = {
client: env.DB_CLIENT,
searchPath: env.DB_SEARCH_PATH,
@@ -26,6 +29,7 @@ const knexConfig: Config = {
deprecate: (msg) => logger.info(msg),
debug: (msg) => logger.debug(msg),
},
pool: poolConfig,
};
if (env.DB_CLIENT === 'sqlite3') {