版本修改
This commit is contained in:
@@ -31,7 +31,7 @@ def choose_task(**context):
|
||||
with DAG(
|
||||
dag_id="office_rent_dag",
|
||||
# 每月25日1点运行
|
||||
schedule_interval="0 3 25 * *",
|
||||
schedule="0 3 25 * *",
|
||||
start_date=pendulum.datetime(2025, 10, 28, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="写字楼租金价格计算",
|
||||
|
||||
@@ -40,7 +40,7 @@ def choose_after_office(**context):
|
||||
with DAG(
|
||||
dag_id="office_sell_dag",
|
||||
# 每月25日3点运行
|
||||
schedule_interval="0 3 25 * *",
|
||||
schedule="0 3 25 * *",
|
||||
start_date=pendulum.datetime(2025, 1, 1, tz="Asia/Shanghai"),
|
||||
catchup=False,
|
||||
description="写字楼出售价格计算",
|
||||
|
||||
@@ -474,4 +474,4 @@ def getOffice(city, district=None, name=None):
|
||||
|
||||
if __name__ == "__main__":
|
||||
# 测试脚本:直接运行时模拟 Airflow 的上下文
|
||||
calc(dag_run=type('DagRun', (), {'conf': {'city': '北京', 'district': '朝阳', 'name': '中核华建大厦'}}))
|
||||
calc(dag_run=type('DagRun', (), {'conf': {}}))
|
||||
@@ -479,4 +479,4 @@ def getOffice(city, district=None, name=None):
|
||||
|
||||
if __name__ == "__main__":
|
||||
# 测试脚本:直接运行时模拟 Airflow 的上下文
|
||||
calc(dag_run=type('DagRun', (), {'conf': {'city': '西安'}}))
|
||||
calc(dag_run=type('DagRun', (), {'conf': {'city': None}}))
|
||||
Reference in New Issue
Block a user