我尝试将 Airbnb AirFlow 配置为使用 CeleryExecutor,如下所示:
我将executer
airflow.cfg中的从更改SequentialExecutor
为CeleryExecutor
:
# The executor class that airflow should use. Choices include
# SequentialExecutor, LocalExecutor, CeleryExecutor
executor = CeleryExecutor
但我收到以下错误:
airflow.configuration.AirflowConfigException: error: cannot use sqlite with the CeleryExecutor
请注意,sql_alchemy_conn
配置如下:
sql_alchemy_conn = sqlite:////root/airflow/airflow.db
我查看了 Airflow 的 GIT(https://github.com/airbnb/airflow/blob/master/airflow/configuration.py)
发现下面的代码抛出了这个异常:
def _validate(self):
if (
self.get("core", "executor") != 'SequentialExecutor' and
"sqlite" in self.get('core', 'sql_alchemy_conn')):
raise AirflowConfigException("error: cannot use sqlite with the {}".
format(self.get('core', 'executor')))
从这种validate
方法看来,sql_alchemy_conn
不能包含sqlite
.
你知道如何配置CeleryExecutor
没有 sqllite 吗?请注意,我下载了 rabitMQ 以根据需要与 CeleryExecuter 一起使用。