core&judge: ignore deleted tasks

This commit is contained in:
undefined committed 2023-03-14 13:14:25 +08:00
1 parent 65556ce630
commit cf88855bee
2 files changed
+9 -3

No files matched your search

+4
View File
@@ -76,6 +76,10 @@ export async function postInit() {
await fs.ensureDir(getConfig('tmp_dir'));
const handle = async (t) => {
const rdoc = await RecordModel.get(t.domainId, t.rid);
if (!rdoc) {
logger.debug('Record not found: %o', t);
return;
}
(new JudgeTask(session, Object.assign(rdoc, t))).handle().catch(logger.error);
};
TaskModel.consume({ type: 'judge' }, handle);