diff --git a/src/python/grpcio_health_checking/grpc_health/v1/_async.py b/src/python/grpcio_health_checking/grpc_health/v1/_async.py index fd2e7be3d9d..acf8d5700cb 100644 --- a/src/python/grpcio_health_checking/grpc_health/v1/_async.py +++ b/src/python/grpcio_health_checking/grpc_health/v1/_async.py @@ -13,12 +13,10 @@ # limitations under the License. """Reference implementation for health checking in gRPC Python.""" -import logging import asyncio import collections import grpc -from grpc.experimental import aio from grpc_health.v1 import health_pb2 as _health_pb2 from grpc_health.v1 import health_pb2_grpc as _health_pb2_grpc @@ -28,14 +26,12 @@ class AsyncHealthServicer(_health_pb2_grpc.HealthServicer): """An AsyncIO implementation of health checking servicer.""" def __init__(self): - self._lock = asyncio.Lock() self._server_status = dict() self._server_watchers = collections.defaultdict(asyncio.Condition) self._gracefully_shutting_down = False async def Check(self, request: _health_pb2.HealthCheckRequest, context): status = self._server_status.get(request.service) - logging.debug('Status %s, %s', request.service, status) if status is None: await context.abort(grpc.StatusCode.NOT_FOUND) diff --git a/src/python/grpcio_health_checking/grpc_health/v1/health.py b/src/python/grpcio_health_checking/grpc_health/v1/health.py index bc97368acf5..99d9c0406bf 100644 --- a/src/python/grpcio_health_checking/grpc_health/v1/health.py +++ b/src/python/grpcio_health_checking/grpc_health/v1/health.py @@ -22,7 +22,8 @@ from grpc_health.v1 import health_pb2 as _health_pb2 from grpc_health.v1 import health_pb2_grpc as _health_pb2_grpc if sys.version_info[0] >= 3 and sys.version_info[1] >= 6: - from ._async import AsyncHealthServicer + # Exposes AsyncHealthServicer as public API. + from ._async import AsyncHealthServicer # pylint: disable=unused-import SERVICE_NAME = _health_pb2.DESCRIPTOR.services_by_name['Health'].full_name