Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from __future__ import absolute_import, unicode_literals
- from celery import shared_task
- from judge.dispatcher import JudgeDispatcher, CustomInvocationDispatcher
- from celery.utils.log import get_task_logger
- from oj.celery import app
- @shared_task
- def judge_task(submission_id, problem_id):
- JudgeDispatcher(submission_id, problem_id).judge()
- @shared_task
- def custom_invocation(code_run_id, problem_id, test_inputs=None):
- CustomInvocationDispatcher(code_run_id, problem_id).compute_outputs(test_inputs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement