fix: chatch errors in the scheduler

This commit is contained in:
tdurieux
2021-09-06 14:54:11 +02:00
parent 20e8d533f4
commit f7266ccff8
+10 -2
View File
@@ -11,7 +11,11 @@ export function conferenceStatusCheck() {
async (data) => { async (data) => {
const conference = new Conference(data); const conference = new Conference(data);
if (conference.isExpired() && conference.status == "ready") { if (conference.isExpired() && conference.status == "ready") {
await conference.expire(); try {
await conference.expire();
} catch (error) {
console.error(error);
}
} }
} }
); );
@@ -25,7 +29,11 @@ export function repositoryStatusCheck() {
await AnonymizedRepositoryModel.find({ status: { $eq: "ready" } }) await AnonymizedRepositoryModel.find({ status: { $eq: "ready" } })
).forEach((data) => { ).forEach((data) => {
const repo = new Repository(data); const repo = new Repository(data);
repo.check(); try {
repo.check();
} catch (error) {
console.log(`Repository ${repo.repoId} is expired`);
}
}); });
}); });
} }