diff --git a/packages/vjudge/package.json b/packages/vjudge/package.json index 35421a1b9..f6628363b 100644 --- a/packages/vjudge/package.json +++ b/packages/vjudge/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/vjudge", - "version": "1.2.2", + "version": "1.2.3", "description": "Submit problems to remote oj", "main": "package.json", "repository": "https://github.com/hydro-dev/Hydro.git", diff --git a/packages/vjudge/src/model.ts b/packages/vjudge/src/model.ts index a729db175..5ef2e886c 100644 --- a/packages/vjudge/src/model.ts +++ b/packages/vjudge/src/model.ts @@ -42,7 +42,7 @@ class Service { while (pids.length) { logger.info(`${domainId}: Syncing page ${page}`); for (const pid of pids) { - if (syncing[`${domainId}/${pid}`] || await ProblemModel.get(domainId, pid)) continue; + if (await ProblemModel.get(domainId, pid) || syncing[`${domainId}/${pid}`]) continue; syncing[`${domainId}/${pid}`] = true; try { const res = await this.api.getProblem(pid);