Skip to content

Commit

Permalink
3
Browse files Browse the repository at this point in the history
  • Loading branch information
liutao420 committed Sep 30, 2024
1 parent d8fc16b commit dd9b2ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/benchmarks/restful.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def waiting_index_finish(args: argparse.Namespace, timewait: int = 5):
time.sleep(timewait)


def process_upsert_data(items: tuple):
def process_upsert_data(items: tuple):
args, index, size, features = items
url = args.url + "/document/upsert"
data = {}
Expand All @@ -184,6 +184,7 @@ def process_upsert_data(items: tuple):
data["documents"].append(param_dict)

rs = requests.post(url, auth=(args.user, args.password), json=data)
logger.info(f"upsert resp:{rs.json()}, url:{url}, auth:{args.user, args.password}")
if rs.json()["code"] != 0:
logger.error(rs.json())
if rs.json()["data"]["total"] != size:
Expand Down

0 comments on commit dd9b2ce

Please sign in to comment.