'To be called within an exception handler when an existing rerun for the given course has failed.'

def failed(self, course_key):

    self.update_state(course_key=course_key, new_state=self.State.FAILED, message=traceback.format_exc()[(- self.model.MAX_MESSAGE_LENGTH):])
