mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
core: update judge config
This commit is contained in:
1 parent
d13876a5bc
commit
a2004056ac
22 files changed
+100
-245
No files matched your search
@@ -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>) {
|
||||
|
||||
@@ -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';
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user