Skip to content
Permalink
Browse files

feat(client): add status logging

  • Loading branch information...
hanxiao committed Sep 11, 2019
1 parent 621c06b commit fdb53a09ad1b9d15beba93813d1e59e6f9722d49
Showing with 4 additions and 1 deletion.
  1. +4 −1 gnes/client/base.py
@@ -67,16 +67,19 @@ class GrpcClient:
def __init__(self, args):
self.args = args
self.logger = set_logger(self.__class__.__name__, self.args.verbose)

self.logger.info('setting up channel...')
self._channel = grpc.insecure_channel(
'%s:%d' % (self.args.grpc_host, self.args.grpc_port),
options={
'grpc.max_send_message_length': -1,
'grpc.max_receive_message_length': -1,
}.items(),
)
self.logger.info('waiting channel to be ready...')
grpc.channel_ready_future(self._channel).result()
self.logger.info('making stub...')
self._stub = gnes_pb2_grpc.GnesRPCStub(self._channel)
self.logger.critical('ready!')

def send_request(self, request):
raise NotImplementedError

0 comments on commit fdb53a0

Please sign in to comment.
You can’t perform that action at this time.