Commit d244700e authored by Wei Shoulin's avatar Wei Shoulin
Browse files

ephem to stream resp

parent caf0f524
......@@ -27,7 +27,9 @@ class CatalogApi(object):
return: csst_dfs_common.models.Result
'''
try:
resps, _ = self.stub.Gaia3Search(ephem_pb2.EphemSearchRequest(
records = []
totalCount = 0
for resp in self.stub.Gaia3Search(ephem_pb2.EphemSearchRequest(
ra = ra,
dec = dec,
radius = radius,
......@@ -35,10 +37,7 @@ class CatalogApi(object):
maxMag = max_mag,
obstime = obstime,
limit = limit
),metadata = get_auth_headers())
records = []
totalCount = 0
for resp in resps:
),metadata = get_auth_headers()):
if resp.success:
data = from_proto_model_list(Gaia3Record, resp.records)
records.extend(data)
......
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