Commit 8cfd792c authored by Wei Shoulin's avatar Wei Shoulin
Browse files

C9

parent 407b231e
......@@ -6,18 +6,18 @@ import io
from csst_dfs_commons.models import Result
from csst_dfs_proto.common.ephem import ephem_pb2, ephem_pb2_grpc
from .service import grpc_channel
from .service import get_grpc_channel
from .utils import get_auth_headers
log = logging.getLogger('csst')
class CatalogApi(object):
def __init__(self):
self.stub_class = ephem_pb2_grpc.EphemSearchSrvStub
self.stub = None
@grpc_channel
def catalog_query(self, **kwargs):
try:
with get_grpc_channel() as c:
self.stub = ephem_pb2_grpc.EphemSearchSrvStub(c)
datas = io.BytesIO()
totalCount = 0
resps = self.stub.Search(ephem_pb2.SearchRequest(
......
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