dag调整

This commit is contained in:
shenjian@fangjia.com
2022-11-28 14:01:00 +08:00
parent c7987031f8
commit a9084fdd1d
@@ -99,8 +99,8 @@ def sync_by_city(city_now):
community_summary_df = es206_client.scan_by_sql_to_data_frame(sql)
with ThreadPoolExecutor(max_workers=50) as pool:
def deal(index, item):
if (index + 1) % 1000 == 0:
log.info(f"已补充{index}")
if index % 1000 == 0 and index > 0:
log.info(f"已查找{index}")
if pd.notna(item['location']) and pd.notna(item['location']['lon']):
location = [item['location']['lon'], item['location']['lat']]
docs = find_nearest_by_location(city_now, location)