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

+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,