mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: fix config read
This commit is contained in:
1 parent
57ee75bd4c
commit
a9a2b4023a
3 files changed
+3
-3
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.1.31",
|
"version": "2.1.32",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "masnn",
|
"author": "masnn",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ export async function readYamlCases(folder: string, cfg: Dictionary<any> = {}, a
|
|||||||
if: subtask.if || [],
|
if: subtask.if || [],
|
||||||
cases,
|
cases,
|
||||||
time_limit_ms: parseTimeMS(subtask.time || cfg.time),
|
time_limit_ms: parseTimeMS(subtask.time || cfg.time),
|
||||||
memory_limit_mb: parseMemoryMB(subtask.memory || cfg.time),
|
memory_limit_mb: parseMemoryMB(subtask.memory || cfg.memory),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -174,12 +174,12 @@ class JudgeTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
end(data) {
|
end(data) {
|
||||||
|
log.info('End: %o', data);
|
||||||
data.key = 'end';
|
data.key = 'end';
|
||||||
data.rid = new ObjectID(this.request.rid);
|
data.rid = new ObjectID(this.request.rid);
|
||||||
data.domainId = this.request.domainId;
|
data.domainId = this.request.domainId;
|
||||||
data.time = data.time_ms ?? data.time;
|
data.time = data.time_ms ?? data.time;
|
||||||
data.memory = data.memory_kb ?? data.memory;
|
data.memory = data.memory_kb ?? data.memory;
|
||||||
log.info('End: status=%d score=%d time=%dms memory=%dkb', data.status, data.score, data.time, data.memory);
|
|
||||||
this.ws.send(JSON.stringify(data));
|
this.ws.send(JSON.stringify(data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user