From f035f6c8db87938da3854dd7f3c235be9402f093 Mon Sep 17 00:00:00 2001 From: Leo Ribeiro Date: Fri, 31 May 2024 17:28:29 -0400 Subject: [PATCH] conditionally initdb --- metrics-collector/src/service-app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/metrics-collector/src/service-app.ts b/metrics-collector/src/service-app.ts index 813b2b3..8844f75 100644 --- a/metrics-collector/src/service-app.ts +++ b/metrics-collector/src/service-app.ts @@ -99,7 +99,9 @@ const seedDb = async () => { console.log("Database seeded with fake metrics"); }; -// initDb(); +if (!process.env.DB_SKIP_INIT) { + initDb(); +} // Collect Metrics Endpoint app.post("/api/v1/metrics", async (req: any, res: any) => {