Methods of checking status of grpc server in python

Viewed 2212

I have a grpc server running at on of my machine. Is there any way to continuously check if that server is running or not other than making a query to the server?

Like in c++ it is mentioned here that using

grpc_connectivity_state GetState(bool try_to_connect);

will give connectivity status. Do we have any option similar to this in python

1 Answers

The method grpc_connectivity_state GetState(bool try_to_connect) will try to create connect if try_to_connect is true when disconnected, and it's basic API for channel, python had it also, you can reference grpc.aio.Channel.get_state;

And this method is for connect, not for server, maybe you need health check to check if server can work correcttly more than check connect status.

Related