[skip e2e]Format code style (#15042)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
pull/15024/merge
zhuwenxing 2022-01-07 19:31:24 +08:00 committed by GitHub
parent e2bf0ce787
commit d1808833a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 7 deletions

View File

@ -11,7 +11,8 @@
import random import random
import time
import argparse
from pymilvus import ( from pymilvus import (
connections, list_collections, connections, list_collections,
FieldSchema, CollectionSchema, DataType, FieldSchema, CollectionSchema, DataType,
@ -19,6 +20,7 @@ from pymilvus import (
) )
TIMEOUT = 120 TIMEOUT = 120
def hello_milvus(host="127.0.0.1"): def hello_milvus(host="127.0.0.1"):
import time import time
# create connection # create connection
@ -93,7 +95,6 @@ def hello_milvus(host="127.0.0.1"):
# Get value of the random value field for search result # Get value of the random value field for search result
print(hit, hit.entity.get("random_value")) print(hit, hit.entity.get("random_value"))
# query # query
expr = "count in [2,4,6,8]" expr = "count in [2,4,6,8]"
output_fields = ["count", "random_value"] output_fields = ["count", "random_value"]
@ -104,14 +105,9 @@ def hello_milvus(host="127.0.0.1"):
# collection.release() # collection.release()
import argparse
parser = argparse.ArgumentParser(description='host ip') parser = argparse.ArgumentParser(description='host ip')
parser.add_argument('--host', type=str, default='127.0.0.1', help='host ip') parser.add_argument('--host', type=str, default='127.0.0.1', help='host ip')
args = parser.parse_args() args = parser.parse_args()
# add time stamp # add time stamp
import time
print(f"\nStart time: {time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))}") print(f"\nStart time: {time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))}")
hello_milvus(args.host) hello_milvus(args.host)