diff --git a/README.md b/README.md index 4ab87d360..760b61ea9 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,14 @@ Hydro 用户群:1085853538

更新日志(点击展开)

+## Hydro 4.18.2 / UI 4.56.2 + +- core: 修复提交答案题压缩包提交 (#917) +- ui: 优化 domain_user 页面性能 +- core: 优化评测任务调度 +- ui: 下载文件失败时自动重试 +- core: Consumer: 从错误中自动恢复 + ## Hydro 4.18.0 / UI 4.56.0 - core&ui: ScoreboardView API diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index 64d023a30..262653afa 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "4.18.1", + "version": "4.18.2", "bin": "bin/hydrooj.js", "main": "src/plugin-api", "module": "src/plugin-api", diff --git a/packages/hydrooj/src/model/problem.ts b/packages/hydrooj/src/model/problem.ts index 818e318c3..f2c3904ee 100644 --- a/packages/hydrooj/src/model/problem.ts +++ b/packages/hydrooj/src/model/problem.ts @@ -603,11 +603,12 @@ export class ProblemModel { if (options.delSource) await fs.remove(tmpdir); } - static async export(domainId: string) { + static async export(domainId: string, pidFilter?:string) { console.log('Exporting problems...'); const tmpdir = path.join(os.tmpdir(), 'hydro', `${Math.random()}.export`); await fs.mkdir(tmpdir); - const pdocs = await ProblemModel.getMulti(domainId, {}, ProblemModel.PROJECTION_PUBLIC).toArray(); + const pdocs = await ProblemModel.getMulti(domainId, pidFilter ? { pid: pidFilter } : {}, ProblemModel.PROJECTION_PUBLIC).toArray(); + if (process.env.HYDRO_CLI) logger.info(`Exporting ${pdocs.length} problems`); for (const pdoc of pdocs) { if (process.env.HYDRO_CLI) logger.info(`Exporting problem ${pdoc.pid || (`P${pdoc.docId}`)} (${pdoc.title})`); const problemPath = path.join(tmpdir, `${pdoc.docId}`); diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index fd8a8f144..f83ea131f 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/ui-default", - "version": "4.56.1", + "version": "4.56.2", "author": "undefined ", "license": "AGPL-3.0", "main": "index.ts", diff --git a/packages/utils/package.json b/packages/utils/package.json index 825943c16..e08344bb0 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/utils", - "version": "1.4.30", + "version": "1.4.31", "description": "hydrooj utils", "main": "lib/utils.ts", "repository": "https://github.com/hydro-dev/Hydro.git", diff --git a/packages/vjudge/package.json b/packages/vjudge/package.json index ed15f3659..ee63a2571 100644 --- a/packages/vjudge/package.json +++ b/packages/vjudge/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/vjudge", - "version": "1.9.14", + "version": "1.9.15", "description": "Submit problems to remote oj", "main": "./src/index.ts", "repository": "https://github.com/hydro-dev/Hydro.git",