mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
vjudge: handle compile error
This commit is contained in:
1 parent
89967df999
commit
06870f0192
2 files changed
+7
-1
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/vjudge",
|
"name": "@hydrooj/vjudge",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"description": "Submit problems to remote oj",
|
"description": "Submit problems to remote oj",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -240,6 +240,12 @@ export default class POJProvider implements IBasicProvider {
|
|||||||
const { text: info } = await this.get(`/showcompileinfo?solution_id=${id}`);
|
const { text: info } = await this.get(`/showcompileinfo?solution_id=${id}`);
|
||||||
const ceInfo = new JSDOM(info);
|
const ceInfo = new JSDOM(info);
|
||||||
await next({ compilerText: ceInfo.window.document.querySelector('pre>font').innerHTML });
|
await next({ compilerText: ceInfo.window.document.querySelector('pre>font').innerHTML });
|
||||||
|
return await end({
|
||||||
|
status,
|
||||||
|
score: 0,
|
||||||
|
time: 0,
|
||||||
|
memory: 0,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
const memory = parseMemoryMB(submission.children[4].innerHTML.trim() || 0) * 1024;
|
const memory = parseMemoryMB(submission.children[4].innerHTML.trim() || 0) * 1024;
|
||||||
const time = parseTimeMS(submission.children[5].innerHTML.trim() || 0);
|
const time = parseTimeMS(submission.children[5].innerHTML.trim() || 0);
|
||||||
|
|||||||
Reference in new issue
Block a user