From 92631fa5acf53933904ad81a4da036195145bf89 Mon Sep 17 00:00:00 2001 From: shoulinwei Date: Thu, 24 Nov 2022 22:17:43 +0800 Subject: [PATCH] no gz --- csst_dfs_api_cluster/common/catalog.py | 21 ++++++++++++--------- csst_dfs_api_cluster/common/service.py | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/csst_dfs_api_cluster/common/catalog.py b/csst_dfs_api_cluster/common/catalog.py index f8a4ad6..936d9c6 100644 --- a/csst_dfs_api_cluster/common/catalog.py +++ b/csst_dfs_api_cluster/common/catalog.py @@ -28,15 +28,18 @@ class CatalogApi(object): ''' try: t_start = time.time() - resp, _ = self.stub.Gaia3Search.with_call(ephem_pb2.EphemSearchRequest( - ra = ra, - dec = dec, - radius = radius, - minMag = min_mag, - maxMag = max_mag, - obstime = obstime, - limit = limit - ),metadata = get_auth_headers()) + resp, _ = self.stub.Gaia3Search(ephem_pb2.EphemSearchRequest( + ra = ra, + dec = dec, + radius = radius, + minMag = min_mag, + maxMag = max_mag, + obstime = obstime, + limit = limit + ), + wait_for_ready = True, + metadata = get_auth_headers() + ) t_end = time.time() log.info("gaia3_query used: %.6f's" %(t_end - t_start,)) if resp.success: diff --git a/csst_dfs_api_cluster/common/service.py b/csst_dfs_api_cluster/common/service.py index 2b05da3..2202e0f 100644 --- a/csst_dfs_api_cluster/common/service.py +++ b/csst_dfs_api_cluster/common/service.py @@ -8,7 +8,7 @@ class ServiceProxy: def channel(self): options = (('grpc.max_send_message_length', 1000 * 1024 * 1024), ('grpc.max_receive_message_length', 1000 * 1024 * 1024)) - channel = grpc.insecure_channel(self.gateway, options = options, compression = grpc.Compression.Gzip) + channel = grpc.insecure_channel(self.gateway, options = options) try: grpc.channel_ready_future(channel).result(timeout=10) except grpc.FutureTimeoutError: -- GitLab