From 09a2733f8e1316cdeb69fee3f890059e4ff9ce02 Mon Sep 17 00:00:00 2001 From: "shenjian@fangjia.com" Date: Thu, 9 Mar 2023 16:32:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/business/business/community/avg_cost.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dags/business/business/community/avg_cost.py b/dags/business/business/community/avg_cost.py index b52ffe3..fdbe80b 100644 --- a/dags/business/business/community/avg_cost.py +++ b/dags/business/business/community/avg_cost.py @@ -115,11 +115,11 @@ def sync(city=None): seaweed_df.loc[index, 'avg_cost'] = None if item['_id'] == '50bd172ae4b0fbe60a6fe628': print(seaweed_df.loc[index]) - # with ThreadPoolExecutor(max_workers=30) as pool: - # for index, item in seaweed_df.iterrows(): - # pool.submit(find_around_price_item, index, item) - for index, item in seaweed_df[seaweed_df['_id'] == '50bd172ae4b0fbe60a6fe628'].iterrows(): - find_around_price_item(index, item) + with ThreadPoolExecutor(max_workers=30) as pool: + for index, item in seaweed_df[seaweed_df['_id'] == '50bd172ae4b0fbe60a6fe628'].iterrows(): + pool.submit(find_around_price_item, index, item) + # for index, item in seaweed_df[seaweed_df['_id'] == '50bd172ae4b0fbe60a6fe628'].iterrows(): + # find_around_price_item(index, item) actions = list() count = 0 for index, item in seaweed_df[seaweed_df['_id'] == '50bd172ae4b0fbe60a6fe628'].iterrows():