版本修改
This commit is contained in:
@@ -2,16 +2,16 @@ from airflow.operators.bash import BashOperator
|
||||
import pendulum
|
||||
from airflow import DAG
|
||||
|
||||
with DAG(
|
||||
dag_id="didata_sync_dag",
|
||||
# 每月28日3点整分运行
|
||||
schedule="0 3 28 * *",
|
||||
start_date=pendulum.datetime(2023, 3, 17, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="地数相关数据同步type: district或office, 不填默认同步全部"
|
||||
) as dag:
|
||||
t1 = BashOperator(
|
||||
task_id='didata_sync_dag',
|
||||
bash_command='python /opt/airflow/dags/repo/dags/business/business/didata_sync.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
|
||||
)
|
||||
t1
|
||||
# with DAG(
|
||||
# dag_id="didata_sync_dag",
|
||||
# # 每月28日3点整分运行
|
||||
# schedule="0 3 28 * *",
|
||||
# start_date=pendulum.datetime(2023, 3, 17, tz="Asia/Shanghai"),
|
||||
# catchup=True,
|
||||
# description="地数相关数据同步type: district或office, 不填默认同步全部"
|
||||
# ) as dag:
|
||||
# t1 = BashOperator(
|
||||
# task_id='didata_sync_dag',
|
||||
# bash_command='python /opt/airflow/dags/repo/dags/business/business/didata_sync.py {{dag_run.conf["type"] if "type" in dag_run.conf}}',
|
||||
# )
|
||||
# t1
|
||||
Reference in New Issue
Block a user