This commit is contained in:
shenjian@fangjia.com
2023-05-10 15:16:48 +08:00
parent bc1af1c4db
commit d4a0ecc971
2 changed files with 8 additions and 3 deletions
@@ -3,9 +3,8 @@
"""
import logging
import pandas as pd
from goojia_utils import ElasticSearchClient, commutils, dateutils, data_utils
from goojia_utils import ElasticSearchClient, dateutils, data_utils
from elasticsearch import helpers
from concurrent.futures import ThreadPoolExecutor
import sys
from threading import Lock
@@ -60,6 +59,8 @@ def sync(city=None):
actions.clear()
if len(actions) > 0:
helpers.bulk(es206_client.elastic_client, actions)
count += len(actions)
log.info("更新:" + str(count))
actions.clear()
log.info("完成调整相对价格排名数据...")
+5 -1
View File
@@ -58,6 +58,10 @@ with DAG(
task_id='relative_price_ranking',
bash_command='python /opt/airflow/dags/repo/dags/business/business/community/relative_price_ranking.py {{dag_run.conf["city"] if "city" in dag_run.conf}}',
)
relative_price_ranking_fix = BashOperator(
task_id='relative_price_ranking_fix',
bash_command='python /opt/airflow/dags/repo/dags/business/business/community/relative_price_ranking_fix.py {{dag_run.conf["city"] if "city" in dag_run.conf}}',
)
estate_charge_complete = BashOperator(
task_id='estate_charge_complete',
bash_command='python /opt/airflow/dags/repo/dags/business/business/community/estate_charge_complete.py {{dag_run.conf["city"] if "city" in dag_run.conf}}',
@@ -103,4 +107,4 @@ with DAG(
bash_command='python /opt/airflow/dags/repo/dags/business/business/community/other.py {{dag_run.conf["city"] if "city" in dag_run.conf}}',
)
# 人均消费并行,值为空
comm >> price >> [avg_cost, total_price, relative_price_ranking, estate_charge_complete] >> total_price_complete >> consumption >> credit >> [estate_charge_ranking, price_rating, person_rating, percentile] >> sell >> trade >> [traffic, business_district, medical, life, education] >> education2 >> extra >> other
comm >> price >> [avg_cost, total_price, relative_price_ranking, estate_charge_complete] >> [total_price_complete, relative_price_ranking_fix] >> consumption >> credit >> [estate_charge_ranking, price_rating, person_rating, percentile] >> sell >> trade >> [traffic, business_district, medical, life, education] >> education2 >> extra >> other