Commit 3c9cecbb authored by liguangyu06's avatar liguangyu06
Browse files

增加多线程

parent f72f2144
...@@ -57,6 +57,7 @@ def c_pur(): ...@@ -57,6 +57,7 @@ def c_pur():
# 轮询获取具体产品信息 # 轮询获取具体产品信息
for i in result["data"]["data"]: for i in result["data"]["data"]:
pkg_def_id = i["pkgDefVOList"][0]["pkgDefId"] pkg_def_id = i["pkgDefVOList"][0]["pkgDefId"]
print(i)
# 设置结算方式为入中心库结算 # 设置结算方式为入中心库结算
i["inSettlement"] = 1 i["inSettlement"] = 1
...@@ -95,7 +96,7 @@ def c_pur(): ...@@ -95,7 +96,7 @@ def c_pur():
"areaCode": "area0379", "areaCode": "area0379",
"deptId": "391d5e06d0ba4cb39a3a7ee2e7934ae7", "deptId": "391d5e06d0ba4cb39a3a7ee2e7934ae7",
"provId": "p00002a0c", "provId": "p00002a0c",
"purMode": "60", "purMode": "10",
"remark": "", "remark": "",
"sourceType": 3, "sourceType": 3,
"stockId": "b278f988a25c4678a1448fb08c3b4a41", "stockId": "b278f988a25c4678a1448fb08c3b4a41",
...@@ -115,7 +116,7 @@ def c_pur(): ...@@ -115,7 +116,7 @@ def c_pur():
# 创建多线程 # 创建多线程
threads = [] threads = []
for _ in range(5): for _ in range(1):
t = threading.Thread(target=c_pur) t = threading.Thread(target=c_pur)
threads.append(t) threads.append(t)
t.start() t.start()
......
...@@ -232,7 +232,7 @@ json_headers_pur: { ...@@ -232,7 +232,7 @@ json_headers_pur: {
"goodsName": "性能测试低值产品" "goodsName": "性能测试低值产品"
}, },
"pageNum": 1, "pageNum": 1,
"pageSize": 2000 "pageSize": 500
} }
......
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