mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
修改判题的目录结构;增加celery 配置
This commit is contained in:
parent
e55997065f
commit
d37bbb3eab
@ -0,0 +1 @@
|
|||||||
|
# coding=utf-8
|
||||||
1
judge/controller/README.md
Normal file
1
judge/controller/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
celery -A judge.controller worker -l DEBUG
|
||||||
1
judge/controller/__init__.py
Normal file
1
judge/controller/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
# coding=utf-8
|
||||||
5
judge/controller/celery.py
Normal file
5
judge/controller/celery.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# coding=utf-8
|
||||||
|
from __future__ import absolute_import
|
||||||
|
from celery import Celery
|
||||||
|
|
||||||
|
app = Celery("judge", broker="redis://localhost:6379/0", include=["judge.controller.tasks"])
|
||||||
8
judge/controller/tasks.py
Normal file
8
judge/controller/tasks.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# coding=utf-8
|
||||||
|
from __future__ import absolute_import
|
||||||
|
from judge.controller.celery import app
|
||||||
|
|
||||||
|
|
||||||
|
@app.task
|
||||||
|
def judge(source_code, language, test_case_id):
|
||||||
|
print source_code, language, test_case_id
|
||||||
0
judge/judger/__init__.py
Normal file
0
judge/judger/__init__.py
Normal file
Loading…
Reference in New Issue
Block a user