AIRFLOW_HOME=/path/to/my/airflow_home
我收到此警告...
>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
我遵守并删除了~/气流/气流.cfg,但它不断回来。
有没有办法告诉气流停止重新创建它?
在 macOS Mojave 上运行
>pip freeze | grep air
apache-airflow==1.10.6
您是否为 airflow 服务器创建了 systemd 服务?
我认为 ~/airflow 文件夹一次又一次地重新创建,因为您将网络服务器作为守护程序模式运行(也许是 launchctl?我不熟悉 macOS(
您应该弄清楚如何将环境变量传递给守护进程。在 Linux 平台上,创建守护程序配置时,"Environment=AIRFLOW_HOME=/path/to/my/airflow_home"是必需的。
[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