utils/tasks.py 整个文件(delete_files) utils/async_helpers.py async_cache_delete problem/utils.py build_problem_template utils/shortcuts.py build_query_string achievement/checker.py get_or_create_stat problem/serializers.py TemplateSerializer delete_files 的唯一调用者是上一个 commit 删掉的 DownloadContestSubmissions (`delete_files.send_with_options(args=(zip_path,), delay=300_000)`,生成 zip 后 延时清理)。django_dramatiq 按约定自动发现各 app 的 tasks.py,缺一个文件不报错, 已实跑确认 judge / achievement / flowchart 三处的 actor 都还在。 ## 扫出来但**不能删**的,记在这里免得下次又查一遍 **achievement/metrics.py 的 18 个指标类**:静态扫描报"零引用",因为类名确实 从不被引用 —— 它们靠 `@metric(key, name)` 装饰器在**定义时**注册进 METRIC_REGISTRY。删掉会静默丢掉成就维度,而且不报错。运行时确认注册表里 18 个一个不少。 **async_cache_get / async_cache_set**:各 6 处引用,只有 delete 那个是死的。 **parse_problem_template**:5 处引用,和被删的 build_problem_template 只是名字像。 **User 模型上的 open_api / open_api_appkey / two_factor_auth / session_keys**: 删字段要迁移,会改生产库结构 —— 而新后端正是靠"库结构与旧后端逐列一致"才能 回滚(阶段 5 演练验证过)。切换完成之前不动。 ## 验证 manage.py check 通过;起本地 Django + PostgreSQL 实跑 14 个端点全部 200 (前台 10 个 + 后台 4 个);ruff 全绿;行尾未被改动。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
OnlineJudge 2.0
An onlinejudge system based on Python and Vue. Demo
Overview
- Based on Docker; One-click deployment
- Separated backend and frontend; Modular programming; Micro service
- ACM/OI rule support; realtime/non-realtime rank support
- Amazing charting and visualization
- Template-problem support
- More reasonable permission control
- Multi-language support:
C,C++,Java,Python2,Python3 - Markdown & MathJax support
- Contest participants IP limit(CIDR)
Main modules are available below:
- Backend(Django): https://github.com/QingdaoU/OnlineJudge
- Frontend(Vue): https://github.com/QingdaoU/OnlineJudgeFE
- Judger Sandbox(Seccomp): https://github.com/QingdaoU/Judger
- JudgeServer(A wrapper for Judger): https://github.com/QingdaoU/JudgeServer
Installation
Follow me: https://github.com/QingdaoU/OnlineJudgeDeploy/tree/2.0
Documents
Screenshots
Frontend:
You can control the menu and chart status in rankings.
Admin:
Browser Support
Modern browsers(chrome, firefox) and Internet Explorer 10+.
Thanks
- I'd appreciate a star if you find this helpful.
- Thanks to everyone that contributes to this project.
- Special thanks to heb1c, who has given us a lot of suggestions.
License
Description












