diff --git a/packages/server/src/environment.js b/packages/server/src/environment.js index bdbbbde79f..594a2aad28 100644 --- a/packages/server/src/environment.js +++ b/packages/server/src/environment.js @@ -24,6 +24,12 @@ if (!LOADED && isDev() && !isTest()) { LOADED = true } +function parseIntSafe(number) { + if (number) { + return parseInt(number) + } +} + let inThread = false module.exports = { @@ -62,6 +68,7 @@ module.exports = { SENDGRID_API_KEY: process.env.SENDGRID_API_KEY, DYNAMO_ENDPOINT: process.env.DYNAMO_ENDPOINT, POSTHOG_TOKEN: process.env.POSTHOG_TOKEN, + QUERY_THREAD_TIMEOUT: parseIntSafe(process.env.QUERY_THREAD_TIMEOUT), // old - to remove CLIENT_ID: process.env.CLIENT_ID, BUDIBASE_DIR: process.env.BUDIBASE_DIR, @@ -71,7 +78,6 @@ module.exports = { DEPLOYMENT_CREDENTIALS_URL: process.env.DEPLOYMENT_CREDENTIALS_URL, ALLOW_DEV_AUTOMATIONS: process.env.ALLOW_DEV_AUTOMATIONS, DISABLE_THREADING: process.env.DISABLE_THREADING, - QUERY_THREAD_TIMEOUT: process.env.QUERY_THREAD_TIMEOUT, SQL_MAX_ROWS: process.env.SQL_MAX_ROWS, _set(key, value) { process.env[key] = value