mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
judge: use addProgress instead of progress
This commit is contained in:
1 parent
5182031bca
commit
8810ccd285
12 files changed
+20
-16
No files matched your search
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.13.0",
|
||||
"version": "2.13.1",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
"dependencies": {
|
||||
"@hydrooj/utils": "workspace:*",
|
||||
"axios": "^0.24.0",
|
||||
"axios": "^0.25.0",
|
||||
"cac": "^6.7.12",
|
||||
"esbuild": "0.14.3",
|
||||
"fs-extra": "^10.0.0",
|
||||
@@ -16,7 +16,7 @@
|
||||
"mongodb": "^3.7.3",
|
||||
"p-queue": "^7.2.0",
|
||||
"shell-quote": "^1.7.3",
|
||||
"ws": "^8.4.2"
|
||||
"ws": "^8.5.0"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"license": "AGPL-3.0-or-later",
|
||||
|
||||
@@ -31,7 +31,7 @@ function judgeCase(c: Case, sid: string) {
|
||||
memory_kb: 0,
|
||||
message: '',
|
||||
},
|
||||
progress: Math.floor((c.id * 100) / ctx.config.count),
|
||||
addProgress: 100 / ctx.config.count,
|
||||
}, c.id);
|
||||
return;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ function judgeCase(c: Case, sid: string) {
|
||||
memory_kb: memory_usage_kb,
|
||||
message,
|
||||
},
|
||||
progress: Math.floor((c.id * 100) / ctx.config.count),
|
||||
addProgress: 100 / ctx.config.count,
|
||||
}, c.id);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ export interface JudgeTaskInterface {
|
||||
status?: number;
|
||||
message?: string;
|
||||
progress?: number;
|
||||
addProgress?: number;
|
||||
case?: {
|
||||
status: number;
|
||||
score?: number;
|
||||
|
||||
Reference in new issue
Block a user