|
|
@ -173,6 +173,8 @@ class JudgeState extends Model { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async updateRelatedInfo(newSubmission) { |
|
|
|
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 (this.type === 0) { |
|
|
|
if (newSubmission) { |
|
|
|
if (newSubmission) { |
|
|
|
await this.loadRelationships(); |
|
|
|
await this.loadRelationships(); |
|
|
@ -191,6 +193,8 @@ class JudgeState extends Model { |
|
|
|
let contest = await Contest.fromID(this.type_info); |
|
|
|
let contest = await Contest.fromID(this.type_info); |
|
|
|
await contest.newSubmission(this); |
|
|
|
await contest.newSubmission(this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async rejudge() { |
|
|
|
async rejudge() { |
|
|
|