core: fix record auto update

This commit is contained in:
undefined committed 2021-09-16 03:57:15 +08:00
1 parent a4f39f9930
commit 2bed36b012
4 files changed
+7 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.35.1",
"version": "2.35.2",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+1 -1
View File
@@ -234,7 +234,7 @@ class RecordMainConnectionHandler extends ConnectionHandler {
if (!this.all && !this.pretest && rdoc.input) return;
if (!this.all && rdoc.domainId !== this.domainId) return;
if (!this.all && rdoc.contest && rdoc.contest.tid.toString() !== this.tid) return;
if (!this.all && rdoc.pid !== this.pid) return;
if (!this.all && this.pid && rdoc.pid !== this.pid) return;
if (this.uid && rdoc.uid !== this.uid) return;
// eslint-disable-next-line prefer-const
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/vjudge",
"version": "1.3.0",
"version": "1.3.1",
"description": "Submit problems to remote oj",
"main": "package.json",
"repository": "https://github.com/hydro-dev/Hydro.git",
+4
View File
@@ -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 });
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) {