core: judge: add concurrency control to task consumer (#719)

Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
Yang Gaoandundefined authored and GitHub committed 2024-01-28 01:23:05 +08:00
1 parent 8b10f51430
commit 6b759cbe63
9 files changed
+130 -83

No files matched your search

+1 -1
View File
@@ -417,7 +417,6 @@ export function Connection(
h.compression = new Shorty();
conn.send('shorty');
}
conn.pause();
if (h._prepare) await h._prepare(args);
if (h.prepare) await h.prepare(args);
// eslint-disable-next-line @typescript-eslint/no-shadow
@@ -606,6 +605,7 @@ ${ctx.response.status} ${endTime - startTime}ms ${ctx.response.length}`);
socket.close(1003, 'Websocket Error');
} catch (e) { }
});
socket.pause();
const ctx: any = app.createContext(request, {} as any);
await domainLayer(ctx, () => baseLayer(ctx, () => layers[1](ctx, () => userLayer(ctx, () => { }))));
for (const manager of router.wsStack) {