32 lines
767 B
Python
32 lines
767 B
Python
"""
|
|
写字楼基准价计算
|
|
"""
|
|
from airflow.operators.bash import BashOperator
|
|
from airflow.operators.python import PythonOperator
|
|
from office.sell.base_price import calc
|
|
from office.sell.fill_base_price import fill_base_price
|
|
|
|
import pendulum
|
|
|
|
from airflow import DAG
|
|
|
|
with DAG(
|
|
dag_id="office_sell_base_price_dag",
|
|
schedule_interval="0 1 27 * *",
|
|
start_date=pendulum.datetime(2025, 3, 24, tz="Asia/Shanghai"),
|
|
catchup=True,
|
|
description="写字楼出售基准价计算"
|
|
) as dag:
|
|
t1 = PythonOperator(
|
|
task_id='calc',
|
|
python_callable=calc,
|
|
provide_context=True
|
|
)
|
|
t2 = PythonOperator(
|
|
task_id='fill_base_price',
|
|
python_callable=fill_base_price,
|
|
provide_context=True
|
|
)
|
|
t1 >> t2
|
|
|