'Update task state and result.'

def store_result(self, task_id, result, state, traceback=None, request=None, **kwargs):

    result = self.encode_result(result, state)
    self._store_result(task_id, result, state, traceback, request=request, **kwargs)
    return result
