'Mark task as executed with failure.'

def mark_as_failure(self, task_id, exc, traceback=None, request=None, store_result=True, call_errbacks=True, state=states.FAILURE):

    if store_result:
        self.store_result(task_id, exc, state, traceback=traceback, request=request)
    if request:
        if request.chord:
            self.on_chord_part_return(request, state, exc)
        if (call_errbacks and request.errbacks):
            self._call_task_errbacks(request, exc, traceback)
