Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. from __future__ import absolute_import, unicode_literals
  2. from celery import shared_task
  3. from judge.dispatcher import JudgeDispatcher, CustomInvocationDispatcher
  4. from celery.utils.log import get_task_logger
  5.  
  6. from oj.celery import app
  7.  
  8. @shared_task
  9. def judge_task(submission_id, problem_id):
  10. JudgeDispatcher(submission_id, problem_id).judge()
  11.  
  12. @shared_task
  13. def custom_invocation(code_run_id, problem_id, test_inputs=None):
  14. CustomInvocationDispatcher(code_run_id, problem_id).compute_outputs(test_inputs)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement