judge: fix testcase id generation

This commit is contained in:
undefined committed 2022-07-11 15:25:02 +08:00
1 parent 3edc425a52
commit c4897b0aba
9 files changed
+33 -38

No files matched your search

+3 -6
View File
@@ -133,14 +133,11 @@ class JudgeTask {
await judge[type].judge(this, startPromise);
}
next(data: Partial<JudgeResultBody>, id?: number) {
log.debug('Next: %d %o', id, data);
next(data: Partial<JudgeResultBody>) {
log.debug('Next: %d %o', data);
data.key = 'next';
data.rid = new ObjectID(this.rid);
if (data.case) {
data.case.id ||= id;
data.case.message ||= '';
}
if (data.case) data.case.message ||= '';
this.ws.send(JSON.stringify(data));
}