judge: add default limit for run

This commit is contained in:
undefined committed 2021-02-17 01:56:13 +08:00
1 parent 3553c2c354
commit 728b49c553
5 files changed
+13 -13

No files matched your search

+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.3.6",
"version": "2.3.7",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
@@ -14,7 +14,7 @@
"lodash": "^4.17.20",
"p-queue": "^6.6.1",
"shell-quote": "^1.7.2",
"systeminformation": "^5.0.9",
"systeminformation": "^5.3.0",
"yargs": "^16.2.0"
},
"peerDependencies": {
@@ -23,7 +23,7 @@
"license": "AGPL-3.0-only",
"devDependencies": {
"@types/bson": "^4.0.2",
"@types/fs-extra": "^9.0.6",
"@types/fs-extra": "^9.0.7",
"@types/js-yaml": "^4.0.0",
"@types/shell-quote": "^1.7.0"
},
+2 -2
View File
@@ -69,8 +69,8 @@ export const judge = async (ctx) => {
stderr,
copyIn,
copyOut,
time_limit_ms: parseTimeMS(ctx.config.time),
memory_limit_mb: parseMemoryMB(ctx.config.memory),
time_limit_ms: parseTimeMS(ctx.config.time || '1s'),
memory_limit_mb: parseMemoryMB(ctx.config.memory || '128m'),
},
);
const { code, time_usage_ms, memory_usage_kb } = res;