judge: add default limit for run

pull/56/head
undefined 4 years ago
parent 3553c2c354
commit 728b49c553

@ -21,7 +21,7 @@
"@shelf/jest-mongodb": "^1.2.3",
"@types/cross-spawn": "^6.0.2",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.22",
"@types/node": "^14.14.27",
"@types/semver": "^7.3.4",
"@typescript-eslint/eslint-plugin": "^4.14.2",
"@typescript-eslint/parser": "^4.14.2",
@ -36,7 +36,7 @@
"ora": "^5.3.0",
"semver": "^7.3.4",
"ts-jest": "^26.5.0",
"typescript": "4.1.3"
"typescript": "4.1.5"
},
"dependencies": {
"fs-extra": "^9.1.0",

@ -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;

@ -27,26 +27,26 @@
"minio": "7.0.17",
"moment-timezone": "^0.5.32",
"mongodb": "^3.6.4",
"nodemailer": "^6.4.17",
"nodemailer": "^6.4.18",
"p-queue": "^6.6.2",
"serialize-javascript": "^5.0.1",
"sockjs": "^0.3.20",
"superagent": "^6.1.0",
"systeminformation": "^5.0.9",
"systeminformation": "^5.3.0",
"terminal-kit": "^1.47.0",
"yargs": "^16.2.0"
},
"devDependencies": {
"@types/adm-zip": "^0.4.33",
"@types/fs-extra": "^9.0.6",
"@types/fs-extra": "^9.0.7",
"@types/js-yaml": "^4.0.0",
"@types/koa": "^2.11.7",
"@types/koa": "^2.11.8",
"@types/koa-router": "^7.4.1",
"@types/koa-static-cache": "^5.1.0",
"@types/lodash": "^4.14.168",
"@types/lru-cache": "^5.1.0",
"@types/minio": "^7.0.7",
"@types/mongodb": "^3.6.3",
"@types/mongodb": "^3.6.7",
"@types/nodemailer": "^6.4.0",
"@types/serialize-javascript": "^5.0.0",
"@types/sockjs": "^0.3.32",

@ -11,7 +11,7 @@
},
"devDependencies": {
"@types/js-yaml": "^4.0.0",
"@types/mongodb": "^3.6.3"
"@types/mongodb": "^3.6.7"
},
"peerDependencies": {
"hydrooj": "2.14.x"

Loading…
Cancel
Save