airflow告诉我删除~/airflow/airflow.cfg。但当我这样做的时候,它会不断被重新创造

airflow告诉我删除~/airflow/airflow.cfg。但当我这样做的时候,它会不断被重新创造,airflow,Airflow,我得到这个警告 AIRFLOW_HOME=/path/to/my/airflow_home 我编辑并删除了~/aiffort/aiffort.cfg,但它不断返回 有没有什么方法可以告诉气流停止重新创建 在macOS Mojave上跑步 >airflow trigger_dag python_dag3 /Users/alexryan/miniconda3/envs/airflow/lib/python3.7/site-packages/airflow/configuration.py:6

我得到这个警告

AIRFLOW_HOME=/path/to/my/airflow_home
我编辑并删除了~/aiffort/aiffort.cfg,但它不断返回

有没有什么方法可以告诉气流停止重新创建

在macOS Mojave上跑步

>airflow trigger_dag python_dag3
/Users/alexryan/miniconda3/envs/airflow/lib/python3.7/site-packages/airflow/configuration.py:627: DeprecationWarning: You have two airflow.cfg files: /Users/alexryan/airflow/airflow.cfg and /path/to/my/airflow_home/airflow.cfg. Airflow used to look at ~/airflow/airflow.cfg, even when AIRFLOW_HOME was set to a different value. Airflow will now only read /path/to/my/airflow_home/airflow.cfg, and you should remove the other file

您是否为airflow server创建了systemd服务

我认为~/airflow文件夹会一次又一次地重新创建,因为您以守护程序模式运行webserver(可能是launchctl?我不熟悉macOS)

您应该了解如何将环境变量传递给守护进程。在Linux平台上,创建守护程序配置时,必须使用“Environment=aiffort\u HOME=/path/to/my/aiffort\u HOME”

>pip freeze | grep air
apache-airflow==1.10.6
[Unit]
Description=Airflow webserver daemon
After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service
Wants=postgresql.service mysql.service redis.service rabbitmq-server.service

[Service]
EnvironmentFile=/etc/sysconfig/airflow
Environment="AIRFLOW_HOME=/path/to/my/airflow_home"
User=airflow
Group=airflow
Type=simple
ExecStart=/bin/airflow webserver
Restart=always
RestartSec=5s

[Install]
WantedBy=multi-user.target