core: rejudge: skip ignored submissions

pull/472/head
undefined 2 years ago
parent b4f2efb139
commit 6cf6a57914

@ -442,6 +442,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
const rdocs = await record.getMulti(domainId, { const rdocs = await record.getMulti(domainId, {
pid, pid,
contest: { $ne: new ObjectID('0'.repeat(24)) }, contest: { $ne: new ObjectID('0'.repeat(24)) },
status: { $ne: STATUS.STATUS_CANCELED },
'files.hack': { $exists: false }, 'files.hack': { $exists: false },
}).project({ _id: 1, contest: 1 }).toArray(); }).project({ _id: 1, contest: 1 }).toArray();
if (!this.pdoc.config || typeof this.pdoc.config === 'string') throw new ProblemConfigError(); if (!this.pdoc.config || typeof this.pdoc.config === 'string') throw new ProblemConfigError();

@ -216,7 +216,10 @@ class RecordDetailHandler extends ContestDetailBaseHandler {
record.update(domainId, rid, $set), record.update(domainId, rid, $set),
TaskModel.deleteMany({ rid: this.rdoc._id }), TaskModel.deleteMany({ rid: this.rdoc._id }),
]); ]);
if (latest) await postJudge(latest); if (latest) {
this.ctx.broadcast('record/change', latest);
await postJudge(latest);
}
this.back(); this.back();
} }
} }

Loading…
Cancel
Save