Commit 92631fa5 authored by Wei Shoulin's avatar Wei Shoulin
Browse files

no gz

parent 7c94a360
...@@ -28,15 +28,18 @@ class CatalogApi(object): ...@@ -28,15 +28,18 @@ class CatalogApi(object):
''' '''
try: try:
t_start = time.time() t_start = time.time()
resp, _ = self.stub.Gaia3Search.with_call(ephem_pb2.EphemSearchRequest( resp, _ = self.stub.Gaia3Search(ephem_pb2.EphemSearchRequest(
ra = ra, ra = ra,
dec = dec, dec = dec,
radius = radius, radius = radius,
minMag = min_mag, minMag = min_mag,
maxMag = max_mag, maxMag = max_mag,
obstime = obstime, obstime = obstime,
limit = limit limit = limit
),metadata = get_auth_headers()) ),
wait_for_ready = True,
metadata = get_auth_headers()
)
t_end = time.time() t_end = time.time()
log.info("gaia3_query used: %.6f's" %(t_end - t_start,)) log.info("gaia3_query used: %.6f's" %(t_end - t_start,))
if resp.success: if resp.success:
......
...@@ -8,7 +8,7 @@ class ServiceProxy: ...@@ -8,7 +8,7 @@ class ServiceProxy:
def channel(self): def channel(self):
options = (('grpc.max_send_message_length', 1000 * 1024 * 1024), options = (('grpc.max_send_message_length', 1000 * 1024 * 1024),
('grpc.max_receive_message_length', 1000 * 1024 * 1024)) ('grpc.max_receive_message_length', 1000 * 1024 * 1024))
channel = grpc.insecure_channel(self.gateway, options = options, compression = grpc.Compression.Gzip) channel = grpc.insecure_channel(self.gateway, options = options)
try: try:
grpc.channel_ready_future(channel).result(timeout=10) grpc.channel_ready_future(channel).result(timeout=10)
except grpc.FutureTimeoutError: except grpc.FutureTimeoutError:
......
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