Moodle Chron wrapped in tryCatch

This commit is contained in:
PxlLoewe
2025-07-11 23:26:01 -07:00
parent d2b287abdc
commit 280393b307

View File

@@ -32,6 +32,7 @@ const syncMoodleIds = async () => {
};
const updateParticipantMoodleResults = async () => {
try {
const participantsMoodlePending = await prisma.participant.findMany({
where: {
finisherMoodleCurseCompleted: false,
@@ -77,6 +78,9 @@ const updateParticipantMoodleResults = async () => {
}
}),
);
} catch (error) {
console.error("Error updating participant Moodle results:", error);
}
};
CronJob.from({ cronTime: "0 * * * *", onTick: syncMoodleIds, start: true });