气流,重新运行 dag 长时间运行

时间:2020-12-31 12:21:14

标签: python airflow

我挖了一个:

default_args = {
    "owner": "rnd",
    "depends_on_past": False,
    "start_date": dt.datetime(2020, 5, 31),
    "retries": 0,
}

dag = DAG(
    "predict_model_universal",
    default_args=default_args,
    description="model prediction DAG",
    max_active_runs=1,
    catchup=True,
    schedule_interval="@daily",
)

model_prediction = PythonOperator(
    task_id="predict",
    python_callable=_predict,
    provide_context=True,
    dag=dag,
)

我需要以编程方式重新运行从开始日期到当前时间的 dag 运行,因为我们在 python 运算符下更改了算法。半年不想手动做。

0 个答案:

没有答案