grpcio-health-checking 1.75.1__py3-none-any.whl → 1.76.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- grpc_health/v1/_async.py +6 -8
- grpc_health/v1/health.py +15 -19
- grpc_health/v1/health_pb2_grpc.py +2 -2
- {grpcio_health_checking-1.75.1.dist-info → grpcio_health_checking-1.76.0.dist-info}/METADATA +2 -2
- grpcio_health_checking-1.76.0.dist-info/RECORD +12 -0
- grpcio_health_checking-1.75.1.dist-info/RECORD +0 -12
- {grpcio_health_checking-1.75.1.dist-info → grpcio_health_checking-1.76.0.dist-info}/LICENSE +0 -0
- {grpcio_health_checking-1.75.1.dist-info → grpcio_health_checking-1.76.0.dist-info}/WHEEL +0 -0
- {grpcio_health_checking-1.75.1.dist-info → grpcio_health_checking-1.76.0.dist-info}/top_level.txt +0 -0
grpc_health/v1/_async.py
CHANGED
|
@@ -104,8 +104,7 @@ class HealthServicer(_health_pb2_grpc.HealthServicer):
|
|
|
104
104
|
"""
|
|
105
105
|
if self._gracefully_shutting_down:
|
|
106
106
|
return
|
|
107
|
-
|
|
108
|
-
await self._set(service, status)
|
|
107
|
+
await self._set(service, status)
|
|
109
108
|
|
|
110
109
|
async def enter_graceful_shutdown(self) -> None:
|
|
111
110
|
"""Permanently sets the status of all services to NOT_SERVING.
|
|
@@ -116,9 +115,8 @@ class HealthServicer(_health_pb2_grpc.HealthServicer):
|
|
|
116
115
|
"""
|
|
117
116
|
if self._gracefully_shutting_down:
|
|
118
117
|
return
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
)
|
|
118
|
+
self._gracefully_shutting_down = True
|
|
119
|
+
for service in self._server_status:
|
|
120
|
+
await self._set(
|
|
121
|
+
service, _health_pb2.HealthCheckResponse.NOT_SERVING
|
|
122
|
+
)
|
grpc_health/v1/health.py
CHANGED
|
@@ -46,8 +46,7 @@ class _Watcher:
|
|
|
46
46
|
self._condition.wait()
|
|
47
47
|
if self._responses:
|
|
48
48
|
return self._responses.popleft()
|
|
49
|
-
|
|
50
|
-
raise StopIteration()
|
|
49
|
+
raise StopIteration()
|
|
51
50
|
|
|
52
51
|
def next(self):
|
|
53
52
|
return self._next()
|
|
@@ -107,8 +106,7 @@ class HealthServicer(_health_pb2_grpc.HealthServicer):
|
|
|
107
106
|
if status is None:
|
|
108
107
|
context.set_code(grpc.StatusCode.NOT_FOUND)
|
|
109
108
|
return _health_pb2.HealthCheckResponse()
|
|
110
|
-
|
|
111
|
-
return _health_pb2.HealthCheckResponse(status=status)
|
|
109
|
+
return _health_pb2.HealthCheckResponse(status=status)
|
|
112
110
|
|
|
113
111
|
# pylint: disable=arguments-differ
|
|
114
112
|
def Watch(self, request, context, send_response_callback=None):
|
|
@@ -150,15 +148,14 @@ class HealthServicer(_health_pb2_grpc.HealthServicer):
|
|
|
150
148
|
with self._lock:
|
|
151
149
|
if self._gracefully_shutting_down:
|
|
152
150
|
return
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
)
|
|
151
|
+
self._server_status[service] = status
|
|
152
|
+
if service in self._send_response_callbacks:
|
|
153
|
+
for send_response_callback in self._send_response_callbacks[
|
|
154
|
+
service
|
|
155
|
+
]:
|
|
156
|
+
send_response_callback(
|
|
157
|
+
_health_pb2.HealthCheckResponse(status=status)
|
|
158
|
+
)
|
|
162
159
|
|
|
163
160
|
def enter_graceful_shutdown(self):
|
|
164
161
|
"""Permanently sets the status of all services to NOT_SERVING.
|
|
@@ -172,9 +169,8 @@ class HealthServicer(_health_pb2_grpc.HealthServicer):
|
|
|
172
169
|
with self._lock:
|
|
173
170
|
if self._gracefully_shutting_down:
|
|
174
171
|
return
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
self._gracefully_shutting_down = True
|
|
172
|
+
for service in self._server_status:
|
|
173
|
+
self.set(
|
|
174
|
+
service, _health_pb2.HealthCheckResponse.NOT_SERVING
|
|
175
|
+
) # pylint: disable=no-member
|
|
176
|
+
self._gracefully_shutting_down = True
|
|
@@ -5,7 +5,7 @@ import warnings
|
|
|
5
5
|
|
|
6
6
|
from grpc_health.v1 import health_pb2 as grpc__health_dot_v1_dot_health__pb2
|
|
7
7
|
|
|
8
|
-
GRPC_GENERATED_VERSION = '1.
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.76.0'
|
|
9
9
|
GRPC_VERSION = grpc.__version__
|
|
10
10
|
_version_not_supported = False
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ except ImportError:
|
|
|
18
18
|
if _version_not_supported:
|
|
19
19
|
raise RuntimeError(
|
|
20
20
|
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
21
|
-
+
|
|
21
|
+
+ ' but the generated code in grpc_health/v1/health_pb2_grpc.py depends on'
|
|
22
22
|
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
23
23
|
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
24
24
|
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
{grpcio_health_checking-1.75.1.dist-info → grpcio_health_checking-1.76.0.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: grpcio-health-checking
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.76.0
|
|
4
4
|
Summary: Standard Health Checking Service for gRPC
|
|
5
5
|
Home-page: https://grpc.io
|
|
6
6
|
Author: The gRPC Authors
|
|
@@ -19,7 +19,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
19
19
|
Requires-Python: >=3.9
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
Requires-Dist: protobuf <7.0.0,>=6.31.1
|
|
22
|
-
Requires-Dist: grpcio >=1.
|
|
22
|
+
Requires-Dist: grpcio >=1.76.0
|
|
23
23
|
|
|
24
24
|
gRPC Python Health Checking
|
|
25
25
|
===========================
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
grpc_health/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577
|
|
2
|
+
grpc_health/v1/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577
|
|
3
|
+
grpc_health/v1/_async.py,sha256=hDjD-LtBKTYUauNUaVx0qnuiW4kfGXQsye0qO3wIcyM,4482
|
|
4
|
+
grpc_health/v1/health.py,sha256=8uYqynejMjqpcQpDglzBiTVhftXccU5jrUNufeEyD-w,6233
|
|
5
|
+
grpc_health/v1/health_pb2.py,sha256=eMWjpw_mAtXc5qYJXWGV6f6ERboQnI8WFIkWrZLQo0o,2492
|
|
6
|
+
grpc_health/v1/health_pb2.pyi,sha256=ETJyL-BuxDwKA49VCfQPZdpKEnHdDR8DOdIAcrxausk,1327
|
|
7
|
+
grpc_health/v1/health_pb2_grpc.py,sha256=SD-RoQaIa03ELU_1wS5TnUaufKbOCQM6HrmzRimkd3Y,6308
|
|
8
|
+
grpcio_health_checking-1.76.0.dist-info/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687
|
|
9
|
+
grpcio_health_checking-1.76.0.dist-info/METADATA,sha256=0y-o097eNopZRKe8kGdJiapg5wGM1PrFn6onbVJ414k,1085
|
|
10
|
+
grpcio_health_checking-1.76.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
11
|
+
grpcio_health_checking-1.76.0.dist-info/top_level.txt,sha256=ccwPL45khtPzN8TVoGT3OED9k19pTNWKAjaYokl0ji0,12
|
|
12
|
+
grpcio_health_checking-1.76.0.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
grpc_health/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577
|
|
2
|
-
grpc_health/v1/__init__.py,sha256=w3kqSAyaZgP-W0890xR4L4WeBPGrtsQCQJe0FUFR0K0,577
|
|
3
|
-
grpc_health/v1/_async.py,sha256=mgLVZvQuCgG04EuRop2uRLNh1ZNU2EsQPAwj-fngK3I,4534
|
|
4
|
-
grpc_health/v1/health.py,sha256=e2_AWerEc5QCmh9Y5B0T9qMTR0pNA-kUcEwS2hlvFTE,6365
|
|
5
|
-
grpc_health/v1/health_pb2.py,sha256=eMWjpw_mAtXc5qYJXWGV6f6ERboQnI8WFIkWrZLQo0o,2492
|
|
6
|
-
grpc_health/v1/health_pb2.pyi,sha256=ETJyL-BuxDwKA49VCfQPZdpKEnHdDR8DOdIAcrxausk,1327
|
|
7
|
-
grpc_health/v1/health_pb2_grpc.py,sha256=1A7U8qZLsKMfZsbzoeogyt_aXOOijazhYT2bM2tUscE,6309
|
|
8
|
-
grpcio_health_checking-1.75.1.dist-info/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687
|
|
9
|
-
grpcio_health_checking-1.75.1.dist-info/METADATA,sha256=yCuQZuDVTFJdnJlQYD3suUiC3wobXSCxXtEXqsEGoXc,1085
|
|
10
|
-
grpcio_health_checking-1.75.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
11
|
-
grpcio_health_checking-1.75.1.dist-info/top_level.txt,sha256=ccwPL45khtPzN8TVoGT3OED9k19pTNWKAjaYokl0ji0,12
|
|
12
|
-
grpcio_health_checking-1.75.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{grpcio_health_checking-1.75.1.dist-info → grpcio_health_checking-1.76.0.dist-info}/top_level.txt
RENAMED
|
File without changes
|