版本修改
This commit is contained in:
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="ai_stock_dag",
|
||||
# 每天运行
|
||||
schedule_interval="30 8 * * 1-5",
|
||||
schedule="30 8 * * 1-5",
|
||||
start_date=pendulum.datetime(2025, 11, 10, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
tags=["ai_stock"],
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="amap_key_generate_dag",
|
||||
# 每天运行
|
||||
schedule_interval="0/1 14 * * *",
|
||||
schedule="0/1 14 * * *",
|
||||
start_date=pendulum.datetime(2023, 3, 18, tz="Asia/Shanghai"),
|
||||
catchup=True
|
||||
) as dag:
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="apiuser_notice_dag",
|
||||
# 每小时运行
|
||||
schedule_interval="0 * * * * ",
|
||||
schedule="0 * * * * ",
|
||||
start_date=pendulum.datetime(2023, 7, 10, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="API接口监控提醒"
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="change_new_to_old_seaweed_dag",
|
||||
# 每月1日1点运行
|
||||
schedule_interval="0 1 1 * *",
|
||||
schedule="0 1 1 * *",
|
||||
start_date=pendulum.datetime(2023, 2, 10, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="新房变二手房定时脚本"
|
||||
|
||||
@@ -8,7 +8,7 @@ from kubernetes.client import models as k8s
|
||||
with DAG(
|
||||
dag_id="comm_add_dag",
|
||||
# 每月20日1点整分运行
|
||||
schedule_interval="0 1 20 * *",
|
||||
schedule="0 1 20 * *",
|
||||
start_date=pendulum.datetime(2023, 5, 8, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="小区自动化入库"
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="community_summary_dag",
|
||||
# 每月2日1点整分运行
|
||||
schedule_interval="0 1 2 * *",
|
||||
schedule="0 1 2 * *",
|
||||
start_date=pendulum.datetime(2023, 3, 16, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="地址输出信息分类数据定时更新"
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="didata_sync_dag",
|
||||
# 每月28日3点整分运行
|
||||
schedule_interval="0 3 28 * *",
|
||||
schedule="0 3 28 * *",
|
||||
start_date=pendulum.datetime(2023, 3, 17, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="地数相关数据同步type: district或office, 不填默认同步全部"
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="evaluate_ratio_dag",
|
||||
# 每月1日0点运行
|
||||
schedule_interval="0 0 1 * *",
|
||||
schedule="0 0 1 * *",
|
||||
start_date=pendulum.datetime(2023, 7, 5, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="挂牌价与成交价计算价格系数"
|
||||
|
||||
@@ -7,7 +7,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="fangjia_log_dag",
|
||||
# 每2分钟监控
|
||||
schedule_interval=timedelta(minutes=2),
|
||||
schedule=timedelta(minutes=2),
|
||||
start_date=pendulum.datetime(2024, 8, 14, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="OPEN日志监控"
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="grid_price_dag",
|
||||
# 每周二运行
|
||||
schedule_interval="0 3 * * 2",
|
||||
schedule="0 3 * * 2",
|
||||
start_date=pendulum.datetime(2023, 5, 9, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="全国格子价格计算"
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="send_email",
|
||||
# 每月1日8点运行
|
||||
schedule_interval="0 8 1 * *",
|
||||
schedule="0 8 1 * *",
|
||||
start_date=pendulum.datetime(2024, 8, 30, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="API用户使用及明细的邮件发送"
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="send_sms",
|
||||
# 每月1日8点运行
|
||||
schedule_interval="0 8 * * *",
|
||||
schedule="0 8 * * *",
|
||||
start_date=pendulum.datetime(2024, 9, 25, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="API用户使用及明细的邮件发送"
|
||||
|
||||
@@ -6,7 +6,7 @@ from airflow import DAG
|
||||
|
||||
with DAG(
|
||||
dag_id="didata_company",
|
||||
schedule_interval=None,
|
||||
schedule=None,
|
||||
start_date=pendulum.datetime(2025, 6, 5, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="企业涉农处理"
|
||||
|
||||
@@ -4,7 +4,7 @@ from airflow import DAG
|
||||
|
||||
with DAG(
|
||||
dag_id="evaluate_dag",
|
||||
schedule_interval="30 16 27 * *",
|
||||
schedule="30 16 27 * *",
|
||||
start_date=pendulum.datetime(2023, 3, 28, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="每月27日估值文件检测"
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="merge_dag",
|
||||
# 每日下午4点
|
||||
schedule_interval="0 16 * * *",
|
||||
schedule="0 16 * * *",
|
||||
start_date=pendulum.datetime(2023, 3, 18, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="每日融合文件检测, 若想指定检测某一天如20230314,则传参day='20230314'"
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="price_exception_dag",
|
||||
# 每月23日运行
|
||||
schedule_interval="0 10 23 * *",
|
||||
schedule="0 10 23 * *",
|
||||
start_date=pendulum.datetime(2023, 3, 17, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="建行每月价格异常检测脚本,默认检测本月与上月差异, 若对比上月与前月价格,设置year_month=\"202210\"(前月日期即可) 若输出样本存在与否,设置year_month=sample"
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="samples_notice_dag",
|
||||
# 每月10日1点运行
|
||||
schedule_interval="0 0 10 * *",
|
||||
schedule="0 0 10 * *",
|
||||
start_date=pendulum.datetime(2025, 6, 9, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="样本数量监控提醒"
|
||||
|
||||
@@ -4,7 +4,7 @@ from airflow import DAG
|
||||
|
||||
with DAG(
|
||||
dag_id="third_gxd_dag",
|
||||
schedule_interval=None,
|
||||
schedule=None,
|
||||
start_date=pendulum.datetime(2024, 7, 22, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="第三方均价及国信达价格输出"
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="third_price_dag",
|
||||
# 每月23日运行
|
||||
schedule_interval="0 16 18 * *",
|
||||
schedule="0 16 18 * *",
|
||||
start_date=pendulum.datetime(2023, 3, 17, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="建行过滤第三方均价"
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ output_date = datetime.datetime.now().strftime('%Y%m')
|
||||
with DAG(
|
||||
dag_id="mt_dag",
|
||||
# 每月5日运行
|
||||
schedule_interval="0 5 5 * *",
|
||||
schedule="0 5 5 * *",
|
||||
start_date=pendulum.datetime(2023, 3, 17, tz="Asia/Shanghai"),
|
||||
catchup=True
|
||||
) as dag:
|
||||
|
||||
@@ -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}}))
|
||||
@@ -10,7 +10,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="district_facilities_dag",
|
||||
# 每月1日1点运行
|
||||
schedule_interval="0 1 1 * *",
|
||||
schedule="0 1 1 * *",
|
||||
start_date=pendulum.datetime(2024, 7, 17, tz="Asia/Shanghai"),
|
||||
catchup=True
|
||||
) as dag:
|
||||
|
||||
@@ -10,7 +10,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="region_price_month_dag",
|
||||
# 每月1日1点运行
|
||||
schedule_interval="0 1 1 * *",
|
||||
schedule="0 1 1 * *",
|
||||
start_date=pendulum.datetime(2024, 12, 6, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="区域房价指数定时计算"
|
||||
|
||||
@@ -10,7 +10,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="seaweed_price_month_dag",
|
||||
# 每月1日1点运行
|
||||
schedule_interval="0 1 1 * *",
|
||||
schedule="0 1 1 * *",
|
||||
start_date=pendulum.datetime(2024, 12, 6, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="小区房价指数定时计算"
|
||||
|
||||
@@ -9,7 +9,7 @@ from airflow import DAG
|
||||
|
||||
with DAG(
|
||||
dag_id="shop_rent_dag",
|
||||
schedule_interval="0 4 25 * *",
|
||||
schedule="0 4 25 * *",
|
||||
start_date=pendulum.datetime(2025, 4, 10, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="商铺租金城市区域商圈均价计算"
|
||||
|
||||
@@ -9,7 +9,7 @@ from airflow import DAG
|
||||
|
||||
with DAG(
|
||||
dag_id="shop_sell_dag",
|
||||
schedule_interval="0 6 25 * *",
|
||||
schedule="0 6 25 * *",
|
||||
start_date=pendulum.datetime(2025, 4, 10, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="商铺出售城市区域商圈均价计算"
|
||||
|
||||
@@ -5,7 +5,7 @@ import pendulum
|
||||
with DAG(
|
||||
dag_id="ai_nonghang_use_dag",
|
||||
# 每天9:40
|
||||
schedule_interval="40 9 * * 1-5",
|
||||
schedule="40 9 * * 1-5",
|
||||
start_date=pendulum.datetime(2025, 2, 13, tz="Asia/Shanghai"),
|
||||
description="AI估价农行使用情况",
|
||||
catchup=True
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="count_price_rent_dag",
|
||||
# 每周日运行
|
||||
schedule_interval="0 10 * * 7",
|
||||
schedule="0 10 * * 7",
|
||||
start_date=pendulum.datetime(2023, 3, 17, tz="Asia/Shanghai"),
|
||||
description="常用字段覆盖率统计",
|
||||
catchup=True
|
||||
|
||||
@@ -5,7 +5,7 @@ import pendulum
|
||||
with DAG(
|
||||
dag_id="community_rating_dag",
|
||||
# 每月的最后一天运行
|
||||
schedule_interval="0 20 * * 6",
|
||||
schedule="0 20 * * 6",
|
||||
start_date=pendulum.datetime(2025, 6, 9, tz="Asia/Shanghai"),
|
||||
description="小区楼盘评级计算",
|
||||
catchup=True
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="district_sell_deal_dag",
|
||||
# 每周五运行
|
||||
schedule_interval="0 1 * * 5",
|
||||
schedule="0 1 * * 5",
|
||||
start_date=pendulum.datetime(2023, 3, 17, tz="Asia/Shanghai"),
|
||||
catchup=True
|
||||
) as dag:
|
||||
|
||||
@@ -5,7 +5,7 @@ from airflow import DAG
|
||||
with DAG(
|
||||
dag_id="increase_decrease_city_region_dag",
|
||||
# 每月的最后一天运行
|
||||
schedule_interval="0 10 L * *",
|
||||
schedule="0 10 L * *",
|
||||
start_date=pendulum.datetime(2024, 5, 30, tz="Asia/Shanghai"),
|
||||
description="城市区域涨跌幅数据统计",
|
||||
catchup=True
|
||||
|
||||
@@ -26,7 +26,7 @@ dag = DAG(
|
||||
'test_failure_notification',
|
||||
#default_args=default_args,
|
||||
start_date=datetime(2025, 4, 22),
|
||||
schedule_interval=None
|
||||
schedule=None
|
||||
)
|
||||
|
||||
task = PythonOperator(
|
||||
|
||||
Reference in New Issue
Block a user