Commit d5c3c7c8 authored by Alexey's avatar Alexey
Browse files

less logging

parent 3a5c5f2c
Showing with 3 additions and 26 deletions
+3 -26
......@@ -359,19 +359,11 @@ class MilvusClient:
log.error(f"SEARCH: Something went wrong with coll: {collection_name}")
def count(self, collection_name):
# Get the number of milvus collection
try:
start = time()
log.debug(f"MilvusClient.count: {collection_name}")
coll = self.prepare_collection(collection_name)
if not coll:
return 0
log.debug(f"MilvusClient.count: get rate, time={time() - start}")
start = time()
num = coll.rate
log.info(f"MilvusClient.count. Result num:{num} of the collection:{collection_name}, time={time() - start}")
return num
return coll.rate
except Exception as e:
# log.exception(e)
log.exception(f"Failed to count vectors in Milvus {collection_name}: {e}")
......
......@@ -100,8 +100,6 @@ class Processor:
return result
async def find(self, snapshot):
log.debug(f'Processor.find method start')
vector = await self.resnet_client.process_snapshot(snapshot)
if vector is None:
......@@ -117,7 +115,7 @@ class Processor:
result = await self._find(snapshot, vector, GLOBAL_COLLECTION_NAME, 128)
log.info(
f'Processor.find result snapshots count: {len(result.snapshots)}')
f'Processor. Find result: {snapshot.braneId} {snapshot.latitude} {snapshot.longitude}: {len(result.snapshots)} ')
return result
async def add(self, snapshot):
......
......@@ -44,13 +44,6 @@ class GRSServerAsync(grs_service_pb2_grpc.GRSServicer):
self.processor = Processor()
async def Find(self, snapshot, context):
nl = '\n'
log.info(
f'FIND: {snapshot.braneId} {snapshot.latitude} {snapshot.longitude} {snapshot.accuracy}'
f'{nl}{snapshot.transform}'
f'{nl}Planes: {len(snapshot.planes)}{nl}Image Size: {len(snapshot.image)}')
res = validate_args(snapshot, context)
if res:
log.warning(f'GRSServer.Find Invalid parameters')
......@@ -59,13 +52,6 @@ class GRSServerAsync(grs_service_pb2_grpc.GRSServicer):
return result
async def Update(self, snapshot, context):
nl = '\n'
log.info(
f'UPD: {snapshot.braneId} {snapshot.latitude} {snapshot.longitude} {snapshot.accuracy}'
f'{nl}{snapshot.transform}'
f'{nl}Planes: {len(snapshot.planes)}'
f'{nl}Image Size: {len(snapshot.image)}')
res = validate_args(snapshot, context)
if res:
log.warning(f'GRSServer.Update Invalid parameters')
......@@ -91,6 +77,7 @@ async def serve(host, port):
await server.wait_for_termination()
metrics_serv.close()
DEFAULT_PORT = 53000
if __name__ == '__main__':
......
Markdown is supported
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