使用 huey 异步队列。 ps 真想自己写一个异步队列,rq 不支持多 worker,celery 太复杂了
This commit is contained in:
9
submission/tasks.py
Normal file
9
submission/tasks.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# coding=utf-8
|
||||
from huey.djhuey import task
|
||||
|
||||
from judge_dispatcher.tasks import JudgeDispatcher
|
||||
|
||||
|
||||
@task()
|
||||
def _judge(submission, time_limit, memory_limit, test_case_id):
|
||||
JudgeDispatcher(submission, time_limit, memory_limit, test_case_id).judge()
|
||||
Reference in New Issue
Block a user