Skip to content

Commit

Permalink
hotfix(containers): process.exit when job finish
Browse files Browse the repository at this point in the history
  • Loading branch information
yossi-eynav committed Feb 10, 2024
1 parent f65268a commit 5b8142e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -50,7 +50,7 @@ async function runAndReport({name, func}) {
},
]
})
return res
process.exit();
} catch (e) {
report({
metricName: "job",
Expand All @@ -66,8 +66,8 @@ async function runAndReport({name, func}) {
]
})
Log.error("failed to run - ", name, e)
throw e
}
process.exit();
}
}

module.exports = {
Expand Down

0 comments on commit 5b8142e

Please sign in to comment.