mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: 修复错误
* 无法下载测试数据的问题 * 无法导出作业成绩单的问题 * cli 模式无法载入的问题 * syzoj 导入跳转错误的问题
This commit is contained in:
1 parent
66639b14de
commit
f0b9bee937
8 files changed
+19
-26
No files matched your search
@@ -8,7 +8,6 @@ import {
|
||||
import options from '../options';
|
||||
import * as bus from '../service/bus';
|
||||
import db from '../service/db';
|
||||
import storage from '../service/storage';
|
||||
|
||||
const COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
|
||||
const ARR = /=>.*$/mg;
|
||||
@@ -26,6 +25,9 @@ async function cli() {
|
||||
if (!global.Hydro.model[modelName]) {
|
||||
return console.error(`Model ${modelName} doesn't exist.`);
|
||||
}
|
||||
if (!func) {
|
||||
return console.log(Object.keys(global.Hydro.model[modelName]));
|
||||
}
|
||||
if (!global.Hydro.model[modelName][func]) {
|
||||
return console.error(`Function ${func} doesn't exist in model ${modelName}.`);
|
||||
}
|
||||
@@ -65,6 +67,7 @@ export async function load() {
|
||||
const sopts = {
|
||||
endPoint, accessKey, secretKey, bucket, region, endPointForUser, endPointForJudge,
|
||||
};
|
||||
const storage = require('../service/storage');
|
||||
await storage.start(sopts);
|
||||
for (const i of builtinLib) require(`../lib/${i}`);
|
||||
await lib(pending, fail);
|
||||
|
||||
Reference in new issue
Block a user