bump dep version

This commit is contained in:
undefined committed 2021-08-06 00:58:39 +08:00
1 parent 7b34eaebb2
commit 54a97b51d5
13 files changed
+34 -35

No files matched your search

+5 -5
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.9.6",
"version": "2.10.0",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
@@ -9,14 +9,14 @@
"@hydrooj/utils": "workspace:*",
"axios": "^0.21.1",
"cac": "^6.7.3",
"esbuild": "^0.12.17",
"esbuild": "^0.12.18",
"fs-extra": "^10.0.0",
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"mongodb": "^3.6.10",
"p-queue": "^6.6.2",
"mongodb": "^3.6.11",
"p-queue": "^7.1.0",
"shell-quote": "^1.7.2",
"ws": "^7.5.3"
"ws": "^8.0.0"
},
"preferUnplugged": true,
"license": "AGPL-3.0-or-later",
+3 -3
View File
@@ -261,13 +261,13 @@ export default class Hydro {
: '{"key":"ping"}';
setInterval(() => this.ws.send(content), 30000);
});
this.ws.on('message', (data) => {
const request = JSON.parse(data.toString());
this.ws.on('message', (data, isBinary) => {
const request = JSON.parse(isBinary ? data : data.toString());
if (request.language) this.language = request.language;
if (request.task) queue.push(new JudgeTask(this, request.task, this.ws));
});
this.ws.on('close', (data, reason) => {
log.warn(`[${this.config.host}] Websocket 断开:`, data, reason);
log.warn(`[${this.config.host}] Websocket 断开:`, data, reason.toString());
setTimeout(() => this.retry(queue), 30000);
});
this.ws.on('error', (e) => {
-1
View File
@@ -177,7 +177,6 @@ export const judge = async (ctx) => {
if (ctx.failed[required.toString()]) effective = false;
}
if (effective) ctx.total_score += scores[sid];
console.log(effective, ctx.total_score, scores[sid], sid);
}
ctx.stat.done = new Date();
if (process.env.DEV) ctx.next({ message: JSON.stringify(ctx.stat) });
+2
View File
@@ -46,7 +46,9 @@ function proc({
cpuLimit: time * 1000 * 1000 * rate,
realCpuLimit: time * 3000 * 1000 * rate,
memoryLimit: memory * 1024 * 1024,
stackLimit: memory * 1024 * 1024,
procLimit: process_limit,
strictMemoryLimit: true,
copyIn,
copyOut,
copyOutCached,