我已经根据这个配置了我的气流设置来与 systemd 一起运行。好几天了,但它引发了一些我不知道如何修复的错误。运行sudo systemctl start airflow-webserver.service除了运行之外并没有真正做任何事情airflow webserver(但是,为了我们的目的需要使用 systemd)。
要了解错误是什么,我运行sudo systemctl status airflow-webserver.service,它给出了以下状态和错误:
Feb 20 18:54:43 ip-172-31-25-17.ec2.internal airflow[19660]: [2019-02-20 18:54:43,774] {models.py:258} INFO - Filling up the DagBag from /home/ec2-user/airflow/dags
Feb 20 18:54:43 ip-172-31-25-17.ec2.internal airflow[19660]: /home/ec2-user/airflow/dags/statcan_1410009501.py:33: SyntaxWarning: name 'pg_hook' is assigned to before global declaration
Feb 20 18:54:43 ip-172-31-25-17.ec2.internal airflow[19660]: global pg_hook
Feb 20 18:54:43 ip-172-31-25-17.ec2.internal airflow[19660]: /usr/lib/python2.7/site-packages/airflow/utils/helpers.py:346: DeprecationWarning: Importing 'PythonOperator' directly from 'airflow.operators' has been deprecated. Please import from 'airflow.operators.[operat...irely in Airflow 2.0. …Run Code Online (Sandbox Code Playgroud)