def stop_session(self, session_id: int) -> core_pb2.StopSessionResponse: """ Stop a running session. :param session_id: id of session :return: stop session response """ request = core_pb2.StopSessionRequest(session_id=session_id) return self.stub.StopSession(request)
def stop_session(self, session_id: int) -> core_pb2.StopSessionResponse: """ Stop a running session. :param session_id: id of session :return: stop session response :raises grpc.RpcError: when session doesn't exist """ request = core_pb2.StopSessionRequest(session_id=session_id) return self.stub.StopSession(request)
def stop_session(self, session_id: int) -> bool: """ Stop a running session. :param session_id: id of session :return: True for success, False otherwise :raises grpc.RpcError: when session doesn't exist """ request = core_pb2.StopSessionRequest(session_id=session_id) response = self.stub.StopSession(request) return response.result