'Enqueue all tasks, in shuffled order.'

def enqueue_all_shuffled_tasks(self, options):

    task_options = ({u'routing_key': options[u'routing_key']} if options.get(u'routing_key') else {})
    for (seq_id, kwargs) in enumerate(self._shuffled_task_kwargs(options)):
        kwargs[u'seq_id'] = seq_id
        result = tasks.compute_grades_for_course_v2.apply_async(kwargs=kwargs, **task_options)
        log.info(u'Grades:    Created    {task_name}[{task_id}]    with    arguments    {kwargs}'.format(task_name=tasks.compute_grades_for_course.name, task_id=result.task_id, kwargs=kwargs))
