mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add RecordDetailHandler.postCancel
judge: allow judge without config
This commit is contained in:
1 parent
e3266ca9e6
commit
ee62870e70
8 files changed
+31
-13
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user