This commit is contained in:
shenjian@fangjia.com
2023-05-11 09:36:28 +08:00
parent 787380ad94
commit 3801ddcc70
@@ -142,12 +142,12 @@ def sync(city=None):
seaweed_list = list()
seaweed_df.apply(lambda x: seaweed_list.append(dict(x)), axis=1)
# with ThreadPoolExecutor(max_workers=30) as pool:
# for seaweed in seaweed_list:
# pool.submit(find_around_price_item, seaweed)
with ThreadPoolExecutor(max_workers=30) as pool:
for seaweed in seaweed_list:
pool.submit(find_around_price_item, seaweed)
for seaweed in seaweed_list:
find_around_price_item(seaweed)
# for seaweed in seaweed_list:
# find_around_price_item(seaweed)
if len(actions) > 0:
helpers.bulk(es206_client.elastic_client, actions)