Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-api-cluster
Commits
d244700e
Commit
d244700e
authored
Dec 29, 2022
by
Wei Shoulin
Browse files
ephem to stream resp
parent
caf0f524
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_dfs_api_cluster/common/catalog.py
View file @
d244700e
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment