def submit_task(request, task_type, task_class, course_key, task_input, task_key):
 with outer_atomic():
  instructor_task = _reserve_task(course_key, task_type, task_key, task_input, request.user)
 task_id = instructor_task.task_id
 task_args = [instructor_task.id, _get_xmodule_instance_args(request, task_id)]
 task_class.apply_async(task_args, task_id=task_id)
 return instructor_task

def submit_task ( request , task_type , task_class , course_key , task_input , task_key ) : with outer_atomic ( ) : instructor_task = _reserve_task ( course_key , task_type , task_key , task_input , request . user ) task_id = instructor_task . task_id task_args = [ instructor_task . id , _get_xmodule_instance_args ( request , task_id ) ] task_class . apply_async ( task_args , task_id = task_id ) return instructor_task
helper method to submit a task .