新增写字楼出售价格重算

This commit is contained in:
沈健
2025-06-10 15:31:57 +08:00
parent cb938f81f0
commit df71f89b07
3 changed files with 216 additions and 127 deletions
+10 -7
View File
@@ -2,6 +2,8 @@
写字楼基准价计算
"""
from airflow.operators.bash import BashOperator
from airflow.operators.python import PythonOperator
from office.sell.base_price import calc
import pendulum
@@ -14,13 +16,14 @@ with DAG(
catchup=True,
description="写字楼出售基准价计算"
) as dag:
t1 = BashOperator(
task_id='sell_base_price',
bash_command='python /opt/airflow/dags/repo/dags/office/sell/base_price.py {{dag_run.conf["yearmonth"] if "yearmonth" in dag_run.conf}}',
)
t2 = BashOperator(
task_id='fill_base_price',
bash_command='python /opt/airflow/dags/repo/dags/office/sell/fill_base_price.py {{dag_run.conf["yearmonth"] if "yearmonth" in dag_run.conf}}',
t1 = PythonOperator(
task_id='base_price',
python_callable=calc,
provide_context=True
)
# t2 = BashOperator(
# task_id='fill_base_price',
# bash_command='python /opt/airflow/dags/repo/dags/office/sell/fill_base_price.py {{dag_run.conf["yearmonth"] if "yearmonth" in dag_run.conf}}',
# )
t1 >> t2