From 91970adae2c596726c6cf46f2c62a48b25acf6bc Mon Sep 17 00:00:00 2001 From: "shenjian@fangjia.com" Date: Mon, 28 Nov 2022 15:47:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/community/estate_charge_complete.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dags/business/business/community/estate_charge_complete.py b/dags/business/business/community/estate_charge_complete.py index 51e2b8a..3e835f7 100644 --- a/dags/business/business/community/estate_charge_complete.py +++ b/dags/business/business/community/estate_charge_complete.py @@ -14,6 +14,9 @@ index_name = "community_summary" def save(community_summary_df): + if 'estate_charge' not in community_summary_df.columns: + log.info("该城市无补充物业费") + return df = community_summary_df[['_id', 'city', 'estate_charge']] df = df.dropna(subset=['estate_charge']) actions = list() @@ -122,8 +125,13 @@ def sync_by_city(city_now): def sync(city=None): if pd.isna(city): + flag = False for city_now in areautils.get_all_cities(): - sync_by_city(city_now) + # 暂时flag标识继续执行后面的补充!!!!!!!!!!!!!!!!!!!!! + if city_now == '定安': + flag = True + if flag is True: + sync_by_city(city_now) else: sync_by_city(city)