From 4e54e33363338f766fc1045fdc56ed43c5bdd8ff Mon Sep 17 00:00:00 2001 From: Arnaud AMBROSELLI Date: Tue, 12 Mar 2024 16:25:57 +0100 Subject: [PATCH] fix: dev env --- .kontinuous/env/dev/values.yaml | 10 ++++++++++ api-node/src/cronjobs/index.ts | 14 ++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.kontinuous/env/dev/values.yaml b/.kontinuous/env/dev/values.yaml index 97de25f0..bca41167 100644 --- a/.kontinuous/env/dev/values.yaml +++ b/.kontinuous/env/dev/values.yaml @@ -7,6 +7,16 @@ api: indice: ~needs: [build-indice, api] +api-node: + env: + - name: ENVIRONMENT + value: "development" + +cronjobs: + env: + - name: ENVIRONMENT + value: "development" + jobs: runs: seed-db: diff --git a/api-node/src/cronjobs/index.ts b/api-node/src/cronjobs/index.ts index 42f857d7..3523f76e 100644 --- a/api-node/src/cronjobs/index.ts +++ b/api-node/src/cronjobs/index.ts @@ -28,9 +28,11 @@ if (sentryEnabled) { }); } -Promise.resolve() - .then(initIndicatorsCleaning) // - .then(initMunicipalities) // - .then(initRecommandations) // - .then(initAggregators) // - .then(initNotifications); // +if (ENVIRONMENT !== 'development') { + Promise.resolve() + .then(initIndicatorsCleaning) // + .then(initMunicipalities) // + .then(initRecommandations) // + .then(initAggregators) // + .then(initNotifications); // +}