From 5b8142ef10de87ac24d1d3e9d0a7e1ddfa1b9f89 Mon Sep 17 00:00:00 2001 From: Yossi Eynav Date: Sat, 10 Feb 2024 18:19:28 +0200 Subject: [PATCH] hotfix(containers): process.exit when job finish --- server/metrics.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/metrics.js b/server/metrics.js index a65a7c7e..f2db586c 100644 --- a/server/metrics.js +++ b/server/metrics.js @@ -36,7 +36,7 @@ const report = async ({ metricName, unit = "None", value = 1.0, dims = [] }) => async function runAndReport({name, func}) { try { - const res = await func() + await func() report({ metricName: "job", dims: [ @@ -50,7 +50,7 @@ async function runAndReport({name, func}) { }, ] }) - return res + process.exit(); } catch (e) { report({ metricName: "job", @@ -66,8 +66,8 @@ async function runAndReport({name, func}) { ] }) Log.error("failed to run - ", name, e) - throw e - } + process.exit(); + } } module.exports = {