edx/edx-ora2 — pull request #395 by wedaly (2014-06-03 18:13:28+00:00)
Title: Bugfix!  Commit the AIGradingWorkflow model before scheduling a grading task.

First bugfix! From examining the MySQL logs, I confirmed that Django was committing the transaction after the worker tried to retrieve the workflow.

Fortunately, `AIGradingWorkflow.start_workflow` was already wrapped in a `commit_on_success` decorator, so I moved the code that looks up and sets the classifier into that transaction. This guarantees that if a classifier set is available, it will be included with the workflow as soon as it is committed to the database.

@stephensanchez