mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bump dep version
This commit is contained in:
1 parent
7b34eaebb2
commit
54a97b51d5
13 files changed
+34
-35
No files matched your search
@@ -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) => {
|
||||
|
||||
@@ -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) });
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user