我尝试配置Airbnb AirFlow以使用CeleryExecutor,如下所示:
我executer将airflow.cfg中的更改SequentialExecutor为CeleryExecutor:
# The executor class that airflow should use. Choices include
# SequentialExecutor, LocalExecutor, CeleryExecutor
executor = CeleryExecutor
Run Code Online (Sandbox Code Playgroud)
但是我收到以下错误:
airflow.configuration.AirflowConfigException: error: cannot use sqlite with the CeleryExecutor
Run Code Online (Sandbox Code Playgroud)
请注意,sql_alchemy_conn配置如下:
sql_alchemy_conn = sqlite:////root/airflow/airflow.db
Run Code Online (Sandbox Code Playgroud)
我查看了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')))
Run Code Online (Sandbox Code Playgroud)
从这种validate方法看来,sql_alchemy_conn不能包含sqlite.
你知道如何配置CeleryExecutor没有sqllite吗?请注意,我根据需要下载了rabitMQ以使用CeleryExecuter.
airflow ×1