我尝试配置Airbnb AirFlow以使用CeleryExecutor,如下所示:
我将airflow.cfg中的 executer 从 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
并发现以下代码抛出此异常:
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 .
你知道如何在没有sqllite的情况下配置 CeleryExecutor 吗?请注意,我根据需要下载了rabitMQ以使用CeleryExecuter .