From 97fce90b27f6e794109d4b6278288979283d6264 Mon Sep 17 00:00:00 2001 From: shoulinwei Date: Thu, 24 Nov 2022 22:23:54 +0800 Subject: [PATCH] gz --- csst_dfs_api_cluster/common/catalog.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/csst_dfs_api_cluster/common/catalog.py b/csst_dfs_api_cluster/common/catalog.py index 936d9c6..d6b5f60 100644 --- a/csst_dfs_api_cluster/common/catalog.py +++ b/csst_dfs_api_cluster/common/catalog.py @@ -28,25 +28,22 @@ class CatalogApi(object): ''' try: t_start = time.time() - 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() - ) + 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()) t_end = time.time() log.info("gaia3_query used: %.6f's" %(t_end - t_start,)) if resp.success: t_start = time.time() data = from_proto_model_list(Gaia3Record, resp.records) t_end = time.time() - log.info("object deserialization used: %.6f's" %(t_end - t_start,)) + # log.info("object deserialization used: %.6f's" %(t_end - t_start,)) return Result.ok_data(data = data).append("totalCount", resp.totalCount) else: return Result.error(message = str(resp.error.detail)) -- GitLab