mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: spj: fix hustoj
This commit is contained in:
1 parent
77c4f6dd27
commit
cc4211abfb
3 files changed
+4
-5
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.10.2",
|
"version": "2.10.3",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -93,11 +93,10 @@ const checkers: Record<string, Checker> = {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
const status = code ? STATUS.STATUS_WRONG_ANSWER : STATUS.STATUS_ACCEPTED;
|
const status = code ? STATUS.STATUS_WRONG_ANSWER : STATUS.STATUS_ACCEPTED;
|
||||||
const message = (await fs.readFile(stdout)).toString();
|
|
||||||
return {
|
return {
|
||||||
status,
|
status,
|
||||||
score: status === STATUS.STATUS_ACCEPTED ? config.score : 0,
|
score: status === STATUS.STATUS_ACCEPTED ? config.score : 0,
|
||||||
message,
|
message: stdout,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -214,9 +214,9 @@ class RecordMainConnectionHandler extends ConnectionHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async onRecordChange(rdoc: RecordDoc) {
|
async onRecordChange(rdoc: RecordDoc) {
|
||||||
if (rdoc.domainId !== this.domainId) return;
|
|
||||||
if (!this.pretest && rdoc.input) return;
|
if (!this.pretest && rdoc.input) return;
|
||||||
if (!rdoc.input && rdoc.contest && rdoc.contest.tid.toString() !== this.tid) return;
|
if (rdoc.domainId !== this.domainId) return;
|
||||||
|
if (rdoc.contest && rdoc.contest.tid.toString() !== this.tid) return;
|
||||||
if (this.uid && rdoc.uid !== this.uid) return;
|
if (this.uid && rdoc.uid !== this.uid) return;
|
||||||
if (this.pid && (rdoc.pid !== this.pid || rdoc.pdomain !== this.pdomain)) return;
|
if (this.pid && (rdoc.pid !== this.pid || rdoc.pdomain !== this.pdomain)) return;
|
||||||
// eslint-disable-next-line prefer-const
|
// eslint-disable-next-line prefer-const
|
||||||
|
|||||||
Reference in new issue
Block a user