vjudge: handle compile error

This commit is contained in:
undefined committed 2021-10-09 23:36:31 +08:00
1 parent 89967df999
commit 06870f0192
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/vjudge",
"version": "1.4.0",
"version": "1.4.1",
"description": "Submit problems to remote oj",
"main": "package.json",
"repository": "https://github.com/hydro-dev/Hydro.git",
+6
View File
@@ -240,6 +240,12 @@ export default class POJProvider implements IBasicProvider {
const { text: info } = await this.get(`/showcompileinfo?solution_id=${id}`);
const ceInfo = new JSDOM(info);
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 time = parseTimeMS(submission.children[5].innerHTML.trim() || 0);