Skip to content

Commit

Permalink
fix: await job to catch exception
Browse files Browse the repository at this point in the history
  • Loading branch information
achauve committed Nov 24, 2023
1 parent 21b1108 commit 2f41249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/cronjobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const launchCronJob = async (name, job) => {
}

try {
job();
await job();
} catch (e) {
capture(e, { level: "error", extra: { name } });
}
Expand Down

0 comments on commit 2f41249

Please sign in to comment.