diff --git a/packages/hydrojudge/package.json b/packages/hydrojudge/package.json index 9ebfffd09..0dc308558 100644 --- a/packages/hydrojudge/package.json +++ b/packages/hydrojudge/package.json @@ -1,7 +1,7 @@ { "name": "@hydrooj/hydrojudge", "bin": "bin/hydrojudge.js", - "version": "2.1.24", + "version": "2.1.25", "main": "package.json", "author": "masnn", "repository": "https://github.com/hydro-dev/Hydro.git", diff --git a/packages/hydrojudge/src/judge/default.ts b/packages/hydrojudge/src/judge/default.ts index ce33e0e6f..dc0f33c9f 100644 --- a/packages/hydrojudge/src/judge/default.ts +++ b/packages/hydrojudge/src/judge/default.ts @@ -19,7 +19,7 @@ const Score = { function judgeCase(c) { return async (ctx, ctxSubtask) => { const { filename } = ctx.config; - const { copyIn } = ctx.execute; + const copyIn = { ...ctx.execute.copyIn }; if (filename) copyIn[`${filename}.in`] = { src: c.input }; const copyOut = filename ? [`${filename}.out`] : []; const stdin = filename ? null : c.input; @@ -144,7 +144,7 @@ export const judge = async (ctx) => { ctx.total_memory_usage_kb = 0; ctx.total_time_usage_ms = 0; // sandbox seems cannot handle concurrent tasks with output file correctly - ctx.queue = new Queue({ concurrency: ctx.config.concurrency || (ctx.config.filename ? 1 : 2) }); + ctx.queue = new Queue({ concurrency: ctx.config.concurrency || 2 }); for (const sid in ctx.config.subtasks) tasks.push(judgeSubtask(ctx.config.subtasks[sid])(ctx)); await Promise.all(tasks); ctx.stat.done = new Date(); diff --git a/packages/hydrojudge/src/judge/run.ts b/packages/hydrojudge/src/judge/run.ts index 7c8c5e0b3..193d348b2 100644 --- a/packages/hydrojudge/src/judge/run.ts +++ b/packages/hydrojudge/src/judge/run.ts @@ -12,7 +12,7 @@ export const judge = async (ctx) => { ctx.execute = await compile(ctx.lang, ctx.code, 'code', {}, ctx.next); ctx.clean.push(ctx.execute.clean); ctx.next({ status: STATUS.STATUS_JUDGING, progress: 0 }); - const { copyIn } = ctx.execute; + const copyIn = { ...ctx.execute.copyIn }; const stdin = path.resolve(ctx.tmpdir, 'stdin'); const stdout = path.resolve(ctx.tmpdir, 'stdout'); const stderr = path.resolve(ctx.tmpdir, 'stderr');