feat(achievement): 添加判定核心、通知模块并接入判题链路

This commit is contained in:
2026-08-04 01:02:29 -06:00
parent 9e0bc1fa8c
commit 95bf02efbd
4 changed files with 185 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import dramatiq
from account.models import User
from achievement.tasks import check_achievements
from judge.dispatcher import JudgeDispatcher
from judge.sql_dispatcher import SQLJudgeDispatcher
from submission.models import Submission
@@ -17,3 +18,6 @@ def judge_task(submission_id, problem_id):
SQLJudgeDispatcher(submission_id, problem_id).judge()
else:
JudgeDispatcher(submission_id, problem_id).judge()
# 判题结束后异步判定成就;投递失败不影响判题结果
check_achievements.send(submission.user_id, submission_id)