Browse Source

Lock on JudgeState::updateRelatedInfo

pull/6/head
Menci 7 years ago
parent
commit
15e66065cd
  1. 4
      models/judge_state.js

4
models/judge_state.js

@ -173,6 +173,8 @@ class JudgeState extends Model {
}
async updateRelatedInfo(newSubmission) {
await syzoj.utils.lock(['JudgeState::updateRelatedInfo', 'problem', this.problem_id], async () => {
await syzoj.utils.lock(['JudgeState::updateRelatedInfo', 'user', this.user_id], async () => {
if (this.type === 0) {
if (newSubmission) {
await this.loadRelationships();
@ -191,6 +193,8 @@ class JudgeState extends Model {
let contest = await Contest.fromID(this.type_info);
await contest.newSubmission(this);
}
});
});
}
async rejudge() {

Loading…
Cancel
Save