Ejemplo n.º 1
0
 def __init__(self, endpoint):
     """Connect to GRAPE engine at the given :code:`endpoint`."""
     # create the gRPC stub
     options = [
         ("grpc.max_send_message_length", 2147483647),
         ("grpc.max_receive_message_length", 2147483647),
     ]
     self._channel = grpc.insecure_channel(endpoint, options=options)
     self._stub = coordinator_service_pb2_grpc.CoordinatorServiceStub(
         self._channel)
     self._session_id = None
     self._logs_fetching_thread = None
Ejemplo n.º 2
0
 def __init__(self, launcher, endpoint, reconnect=False):
     """Connect to GRAPE engine at the given :code:`endpoint`."""
     # create the gRPC stub
     options = [
         ("grpc.max_send_message_length", GS_GRPC_MAX_MESSAGE_LENGTH),
         ("grpc.max_receive_message_length", GS_GRPC_MAX_MESSAGE_LENGTH),
         ("grpc.max_metadata_size", GS_GRPC_MAX_MESSAGE_LENGTH),
     ]
     self._launcher = launcher
     self._grpc_utils = GRPCUtils()
     self._channel = grpc.insecure_channel(endpoint, options=options)
     self._stub = coordinator_service_pb2_grpc.CoordinatorServiceStub(self._channel)
     self._session_id = None
     self._logs_fetching_thread = None
     self._reconnect = reconnect