mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add judge priority system
This commit is contained in:
1 parent
c43663a1d1
commit
faae0805c1
5 files changed
+20
-8
No files matched your search
@@ -33,8 +33,10 @@ async function _postJudge(rdoc: Rdoc) {
|
||||
: await problem.get(rdoc.domainId, rdoc.pid);
|
||||
const difficulty = difficultyAlgorithm(pdoc.nSubmit, pdoc.nAccept);
|
||||
if (!updated) await record.updateMulti(rdoc.domainId, { uid: rdoc.uid, status: builtin.STATUS.STATUS_ACCEPTED }, { effective: false });
|
||||
await record.update(rdoc.domainId, rdoc._id, { effective: true });
|
||||
await problem.edit(pdoc.domainId, pdoc.docId, { difficulty });
|
||||
await Promise.all([
|
||||
record.update(rdoc.domainId, rdoc._id, { effective: true }),
|
||||
problem.edit(pdoc.domainId, pdoc.docId, { difficulty }),
|
||||
]);
|
||||
await bus.serial('record/judge', rdoc, updated);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user