judge: fix?

This commit is contained in:
undefined committed 2021-06-12 16:26:53 +08:00
1 parent 85def7213b
commit 4fd580e4ed
3 files changed
+5 -3

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "@hydrooj/hydrojudge", "name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js", "bin": "bin/hydrojudge.js",
"version": "2.8.4", "version": "2.8.5",
"main": "package.json", "main": "package.json",
"author": "undefined <i@undefined.moe>", "author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git", "repository": "https://github.com/hydro-dev/Hydro.git",
+1 -1
View File
@@ -206,7 +206,7 @@ export default class Hydro {
if (etags[file.name] !== file.etag + file.lastModified) filenames.push(file.name); if (etags[file.name] !== file.etag + file.lastModified) filenames.push(file.name);
} }
for (const name in etags) { for (const name in etags) {
if (!allFiles.has(name)) await fs.rm(path.join(filePath, name)); if (!allFiles.has(name) && fs.existsSync(path.join(filePath, name))) await fs.rm(path.join(filePath, name));
} }
if (filenames.length) { if (filenames.length) {
log.info(`Getting problem data: ${this.config.host}/${domainId}/${pid}`); log.info(`Getting problem data: ${this.config.host}/${domainId}/${pid}`);
+3 -1
View File
@@ -26,12 +26,14 @@ function judgeCase(c) {
time: ctxSubtask.subtask.time, time: ctxSubtask.subtask.time,
memory: ctxSubtask.subtask.memory, memory: ctxSubtask.subtask.memory,
}, { }, {
execute: `${ctx.executeInteractor.execute.replace(/\$\{name\}/g, 'interactor')} /w/in /w/tout`, execute: `${ctx.executeInteractor.execute.replace(/\$\{name\}/g, 'interactor')} /w/in /w/tout /w/tout`,
copyIn: ctx.executeInteractor.copyIn, copyIn: ctx.executeInteractor.copyIn,
time: ctxSubtask.subtask.time * 2, time: ctxSubtask.subtask.time * 2,
memory: ctxSubtask.subtask.memory * 2, memory: ctxSubtask.subtask.memory * 2,
copyOut: ['/w/tout?'],
}, },
]); ]);
// TODO handle tout (maybe pass to checker?)
let status; let status;
let score = 0; let score = 0;
let message: any = ''; let message: any = '';