From 9020d318871e97a4b59055534a7621737ca2f7fb Mon Sep 17 00:00:00 2001 From: "shenjian@fangjia.com" Date: Tue, 6 Dec 2022 15:41:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=8D=E4=BD=8E=E7=BA=BF=E7=A8=8B=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/business/business/community/sell.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dags/business/business/community/sell.py b/dags/business/business/community/sell.py index 8514bb1..408cf31 100644 --- a/dags/business/business/community/sell.py +++ b/dags/business/business/community/sell.py @@ -29,12 +29,12 @@ def build_doc(item): def sync(city=None): log.info(f"开始同步出售信息至206 {index_name}") - seaweed_query = {'cat': 'district', 'status': 0} - if pd.notna(city): - seaweed_query['city'] = city seaweed_df = pd.read_csv(path + '/seaweed.csv', sep='@', encoding='UTF-8') + if pd.notna(city): + seaweed_df = seaweed_df[seaweed_df['city'] == city].copy() + seaweed_df = seaweed_df.reset_index(drop=True) - with ThreadPoolExecutor(50) as pool: + with ThreadPoolExecutor(30) as pool: def deal(index, item): if index % 1000 == 0: log.info("已处理" + str(index))