From 8e8c1478987392f34f6e558e766cae1b4b2f7eb9 Mon Sep 17 00:00:00 2001 From: Nicolas Lepage <19571875+nlepage@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:10:37 +0100 Subject: [PATCH] fix(api): reads START_JOB_IN_WEB_PROCESS as Boolean Co-authored-by: Laura Bergoens --- api/index.js | 2 +- api/src/shared/config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/index.js b/api/index.js index 23a000f07e2..60a718658eb 100644 --- a/api/index.js +++ b/api/index.js @@ -67,7 +67,7 @@ process.on('SIGINT', () => { (async () => { try { await start(); - if (process.env.START_JOB_IN_WEB_PROCESS) { + if (config.infra.startJobInWebProcess) { import('./worker.js'); } } catch (error) { diff --git a/api/src/shared/config.js b/api/src/shared/config.js index cb0dac00bb4..0da46402572 100644 --- a/api/src/shared/config.js +++ b/api/src/shared/config.js @@ -237,6 +237,7 @@ const configuration = (function () { process.env.INFRA_CHUNK_SIZE_ORGANIZATION_LEARNER_DATA_PROCESSING, 1000, ), + startJobInWebProcess: toBoolean(process.env.START_JOB_IN_WEB_PROCESS), }, jwtConfig: { livretScolaire: {