core: update judge config

This commit is contained in:
undefined committed 2022-02-25 12:09:32 +08:00
1 parent d13876a5bc
commit a2004056ac
22 files changed
+100 -245

No files matched your search

+8 -3
View File
@@ -112,7 +112,11 @@ class JudgeTask {
this.stat.read_cases = new Date();
this.config = await readCases(
this.folder,
{ detail: this.session.config.detail, ...this.config },
{
detail: this.session.config.detail,
isSelfSubmission: this.config.problemOwner === this.request.uid,
...this.config,
},
{ next: this.next, key: md5(`${this.source}/${getConfig('secret')}`) },
);
this.stat.judge = new Date();
@@ -243,10 +247,11 @@ export default class Hydro {
return filePath;
}
getLang(name: string) {
getLang(name: string, doThrow = true) {
if (this.language[name]) return this.language[name];
if (name === 'cpp' && this.language.cc) return this.language.cc;
throw new SystemError('Unsupported language {0}', [name]);
if (doThrow) throw new SystemError('Unsupported language {0}', [name]);
return null;
}
async consume(queue: Queue<any>) {
+2 -2
View File
@@ -1,2 +1,2 @@
export { default as vj4, default } from './vj4';
export { default as hydro } from './hydro';
export { default as vj4 } from './vj4';
export { default as hydro, default } from './hydro';
+2
View File
@@ -1,6 +1,8 @@
export default class VJ4 {
constructor() {
console.log('新版本不再支持 VJ4。请降级至 hydrojudge@2.5.21 或迁移到 Hydro。');
console.log('This version of HydroJudge nolonger supports VJ4. Please downgrade to');
console.log('hydrojudge@2.5.21 or migrate to Hydro.');
console.log('详细文档: https://hydro.js.org/ ');
process.exit(1);
}