|
|
|
@ -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() { |
|
|
|
|