Commit 97fce90b authored by Wei Shoulin's avatar Wei Shoulin
Browse files

gz

parent edce42f0
...@@ -28,7 +28,7 @@ class CatalogApi(object): ...@@ -28,7 +28,7 @@ class CatalogApi(object):
''' '''
try: try:
t_start = time.time() t_start = time.time()
resp, _ = self.stub.Gaia3Search(ephem_pb2.EphemSearchRequest( resp, _ = self.stub.Gaia3Search.with_call(ephem_pb2.EphemSearchRequest(
ra = ra, ra = ra,
dec = dec, dec = dec,
radius = radius, radius = radius,
...@@ -36,17 +36,14 @@ class CatalogApi(object): ...@@ -36,17 +36,14 @@ class CatalogApi(object):
maxMag = max_mag, maxMag = max_mag,
obstime = obstime, obstime = obstime,
limit = limit limit = limit
), ),metadata = get_auth_headers())
wait_for_ready = True,
metadata = get_auth_headers()
)
t_end = time.time() t_end = time.time()
log.info("gaia3_query used: %.6f's" %(t_end - t_start,)) log.info("gaia3_query used: %.6f's" %(t_end - t_start,))
if resp.success: if resp.success:
t_start = time.time() t_start = time.time()
data = from_proto_model_list(Gaia3Record, resp.records) data = from_proto_model_list(Gaia3Record, resp.records)
t_end = time.time() 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) return Result.ok_data(data = data).append("totalCount", resp.totalCount)
else: else:
return Result.error(message = str(resp.error.detail)) return Result.error(message = str(resp.error.detail))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment