mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: add default limit for run
This commit is contained in:
1 parent
3553c2c354
commit
728b49c553
5 files changed
+13
-13
No files matched your search
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user