简体   繁体   English

命令行选项以激活气流DAG

[英]Command Line Option to Activate Airflow DAGs

We have a continuous integration pipeline which automatically deploys our Airflow DAGs to the Airflow server. 我们有一个连续的集成管道,可以将我们的Airflow DAG自动部署到Airflow服务器。 When a new version of a DAG is deployed, its status is OFF by default. 部署新版本的DAG时,默认情况下其状态为OFF We would like to turn it ON as part of the tasks executed by the deployment process. 作为部署过程执行的任务的一部分,我们希望将其打开

Is there a command line option in Airflow which allows to turn ON a DAG? Airflow中是否有命令行选项可以打开DAG? Thank you 谢谢

Ok it seems I did not look carefully enough. 好吧,看来我看起来不够仔细。 The answer is just here in Airflow Documentation 答案就在Airflow文档中

You can turn OFF a DAG with the following command: 您可以使用以下命令关闭 DAG:

$ airflow pause <dag_id>

You can turn ON a DAG with the following command: 您可以使用以下命令打开 DAG:

$ airflow unpause <dag_id>

当您说新版本时,我假设您更改了DAG_ID,是否考虑将airflow.cfg更新为dags_are_paused_at_creation = False

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM