mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
vjudge: luogu: progress report
This commit is contained in:
1 parent
c8ec439b96
commit
d8bfbb0a22
3 files changed
+3
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/vjudge",
|
"name": "@hydrooj/vjudge",
|
||||||
"version": "1.4.6",
|
"version": "1.4.7",
|
||||||
"description": "Submit problems to remote oj",
|
"description": "Submit problems to remote oj",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class Service {
|
|||||||
try {
|
try {
|
||||||
const rid = await this.api.submitProblem(task.target, task.lang, task.code, task, next, end);
|
const rid = await this.api.submitProblem(task.target, task.lang, task.code, task, next, end);
|
||||||
if (!rid) return;
|
if (!rid) return;
|
||||||
await next({ status: STATUS.STATUS_JUDGING });
|
await next({ status: STATUS.STATUS_JUDGING, message: `ID = ${rid}` });
|
||||||
await this.api.waitForSubmission(rid, next, end);
|
await this.api.waitForSubmission(rid, next, end);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
end({ status: STATUS.STATUS_SYSTEM_ERROR, message: e.message });
|
end({ status: STATUS.STATUS_SYSTEM_ERROR, message: e.message });
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ export default class LuoguProvider implements IBasicProvider {
|
|||||||
let fail = 0;
|
let fail = 0;
|
||||||
let count = 0;
|
let count = 0;
|
||||||
let finished = 0;
|
let finished = 0;
|
||||||
|
next({ progress: 5 });
|
||||||
while (count < 120 && fail < 5) {
|
while (count < 120 && fail < 5) {
|
||||||
await sleep(1500);
|
await sleep(1500);
|
||||||
count++;
|
count++;
|
||||||
|
|||||||
Reference in new issue
Block a user