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

bytes

parent 2d128fe8
......@@ -30,7 +30,8 @@ class CatalogApi(object):
try:
datas = b''
totalCount = 0
for resp in self.stub.Gaia3Search(ephem_pb2.EphemSearchRequest(
resps = self.stub.Gaia3Search(ephem_pb2.EphemSearchRequest(
ra = ra,
dec = dec,
radius = radius,
......@@ -38,7 +39,8 @@ class CatalogApi(object):
maxMag = max_mag,
obstime = obstime,
limit = limit
),metadata = get_auth_headers()):
),metadata = get_auth_headers())
for resp in resps:
if resp.success:
# data = from_proto_model_list(Gaia3Record, resp.records)
datas = datas + resp.records
......@@ -208,7 +210,6 @@ class CatalogApi(object):
rec.NS64HIdx = r[155]
rec.FileIdx = r[156]
ret_records2.append(rec)
return Result.ok_data(data = ret_records2).append("totalCount", totalCount)
except grpc.RpcError as e:
return Result.error(message="%s:%s" % (e.code().value, e.details()))
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