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