mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
judge: 修复交互题无法正常读取ans流的问题
This commit is contained in:
1 parent
8e0c140ef4
commit
c49a24017f
3 files changed
+10
-3
No files matched your search
@@ -76,6 +76,7 @@ async function adaptResult(result, params) {
|
||||
|
||||
export async function runMultiple(execute) {
|
||||
let res;
|
||||
const size = parseMemoryMB(getConfig('stdio_size'));
|
||||
try {
|
||||
const body = {
|
||||
cmd: [
|
||||
@@ -85,9 +86,15 @@ export async function runMultiple(execute) {
|
||||
pipeMapping: [{
|
||||
in: { index: 0, fd: 1 },
|
||||
out: { index: 1, fd: 0 },
|
||||
proxy: true,
|
||||
name: 'stdout',
|
||||
max: 1024 * 1024 * size,
|
||||
}, {
|
||||
in: { index: 1, fd: 1 },
|
||||
out: { index: 0, fd: 0 },
|
||||
proxy: true,
|
||||
name: 'stdout',
|
||||
max: 1024 * 1024 * size,
|
||||
}],
|
||||
};
|
||||
body.cmd[0].files[0] = null;
|
||||
@@ -105,7 +112,7 @@ export async function runMultiple(execute) {
|
||||
return await Promise.all(res.data.map((i) => adaptResult(i, {})));
|
||||
}
|
||||
|
||||
export async function del(fileId) {
|
||||
export async function del(fileId: string) {
|
||||
const res = await Axios.create({ baseURL: getConfig('sandbox_host') }).delete(`/file/${fileId}`);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user