judge: limit output length

This commit is contained in:
undefined committed 2021-08-06 11:47:59 +08:00
1 parent aabc4c432f
commit 350716092a
3 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.10.1",
"version": "2.10.2",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
+1
View File
@@ -53,6 +53,7 @@ const checkers: Record<string, Checker> = {
}
}
} else status = STATUS.STATUS_ACCEPTED;
if (message.length > 1024000) message = '';
return {
score: status === STATUS.STATUS_ACCEPTED ? config.score : 0,
status,
+1 -1
View File
@@ -95,7 +95,7 @@ export const judge = async (ctx) => {
status,
time_ms: time_usage_ms,
memory_kb: memory_usage_kb,
message: message.join('\n'),
message: message.join('\n').substr(0, 1024000),
},
});
ctx.stat.done = new Date();