优化
This commit is contained in:
@@ -142,12 +142,12 @@ def sync(city=None):
|
|||||||
seaweed_list = list()
|
seaweed_list = list()
|
||||||
seaweed_df.apply(lambda x: seaweed_list.append(dict(x)), axis=1)
|
seaweed_df.apply(lambda x: seaweed_list.append(dict(x)), axis=1)
|
||||||
|
|
||||||
# with ThreadPoolExecutor(max_workers=30) as pool:
|
with ThreadPoolExecutor(max_workers=30) as pool:
|
||||||
# for seaweed in seaweed_list:
|
for seaweed in seaweed_list:
|
||||||
# pool.submit(find_around_price_item, seaweed)
|
pool.submit(find_around_price_item, seaweed)
|
||||||
|
|
||||||
for seaweed in seaweed_list:
|
# for seaweed in seaweed_list:
|
||||||
find_around_price_item(seaweed)
|
# find_around_price_item(seaweed)
|
||||||
|
|
||||||
if len(actions) > 0:
|
if len(actions) > 0:
|
||||||
helpers.bulk(es206_client.elastic_client, actions)
|
helpers.bulk(es206_client.elastic_client, actions)
|
||||||
|
|||||||
Reference in New Issue
Block a user