core: add RecordDetailHandler.postCancel

judge: allow judge without config
This commit is contained in:
undefined committed 2020-10-29 22:07:54 +08:00
1 parent e3266ca9e6
commit ee62870e70
8 files changed
+31 -13

No files matched your search

+1 -1
View File
@@ -281,7 +281,7 @@ function convertIniConfig(ini: string) {
return res;
}
export default async function readCases(folder: string, cfg: Record<string, any>, args) {
export default async function readCases(folder: string, cfg: Record<string, any> = {}, args) {
const iniConfig = path.resolve(folder, 'config.ini');
const yamlConfig = path.resolve(folder, 'config.yaml');
let config;
+1 -1
View File
@@ -39,7 +39,7 @@ function judgeCase(c) {
status = STATUS.STATUS_RUNTIME_ERROR;
if (code < 32) message = signals[code];
else message = `您的程序返回了 ${code}.`;
} else[status, score, message] = resInteractor.files.stderr.split('\n');
} else [status, score, message] = resInteractor.files.stderr.split('\n');
ctxSubtask.score = Score[ctxSubtask.subtask.type](ctxSubtask.score, score);
ctxSubtask.status = Math.max(ctxSubtask.status, status);
ctx.total_time_usage_ms += time_usage_ms;
+1 -1
View File
@@ -16,7 +16,7 @@ declare module 'hydrooj/dist/interface' {
async function postInit() {
// Only start a single daemon
if (!cluster.isFirstWorker) return;
if (!global.Hydro.isFirstWorker) return;
const { compilerText } = require('./utils');
const tmpfs = require('./tmpfs');
const { FormatError, CompileError, SystemError } = require('./error');