优化
This commit is contained in:
@@ -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("完成调整相对价格排名数据...")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user