mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix record auto update
This commit is contained in:
1 parent
a4f39f9930
commit
2bed36b012
4 files changed
+11
-7
No files matched your search
@@ -30,10 +30,14 @@ class Service {
|
||||
const next = (payload) => Judge.next({ ...payload, rid: task.rid });
|
||||
const end = (payload) => Judge.end({ ...payload, rid: task.rid });
|
||||
await next({ status: STATUS.STATUS_FETCHED });
|
||||
const rid = await this.api.submitProblem(task.target, task.lang, task.code, task, next, end);
|
||||
if (!rid) return;
|
||||
await next({ status: STATUS.STATUS_JUDGING });
|
||||
await this.api.waitForSubmission(rid, next, end);
|
||||
try {
|
||||
const rid = await this.api.submitProblem(task.target, task.lang, task.code, task, next, end);
|
||||
if (!rid) return;
|
||||
await next({ status: STATUS.STATUS_JUDGING });
|
||||
await this.api.waitForSubmission(rid, next, end);
|
||||
} catch (e) {
|
||||
end({ status: STATUS.STATUS_SYSTEM_ERROR, message: e.message });
|
||||
}
|
||||
}
|
||||
|
||||
async sync(domainId: string, resync = false) {
|
||||
|
||||
Reference in new issue
Block a user