'Store return value and state of an executed task.'

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

    self._get_connection(write=True)
    self._session.execute(self._write_stmt, (task_id, state, buf_t(self.encode(result)), self.app.now(), buf_t(self.encode(traceback)), buf_t(self.encode(self.current_task_children(request)))))
