mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
vjudge: add syncDone mark
This commit is contained in:
1 parent
8caa621d8b
commit
2de03000ab
2 files changed
+5
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/vjudge",
|
"name": "@hydrooj/vjudge",
|
||||||
"version": "1.0.12",
|
"version": "1.0.13",
|
||||||
"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",
|
||||||
|
|||||||
@@ -67,7 +67,10 @@ class Service {
|
|||||||
else return;
|
else return;
|
||||||
TaskModel.consume({ type: 'remotejudge', subType: this.account.type }, this.judge.bind(this));
|
TaskModel.consume({ type: 'remotejudge', subType: this.account.type }, this.judge.bind(this));
|
||||||
const ddocs = await DomainModel.getMulti({ mount: this.account.type }).toArray();
|
const ddocs = await DomainModel.getMulti({ mount: this.account.type }).toArray();
|
||||||
for (const ddoc of ddocs) await this.sync(ddoc._id);
|
for (const ddoc of ddocs) {
|
||||||
|
if (!ddoc.syncDone) await this.sync(ddoc._id);
|
||||||
|
await DomainModel.edit(ddoc._id, { syncDone: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user