我尝试配置的Airbnb气流这样使用CeleryExecutor工作:配置气流与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
我看着气流的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
看起来。
您是否知道如何配置没有sqllite的CeleryExecutor
?请注意,我根据需要下载了rabitMQ与CeleryExecuter一起工作。
我可以知道如何添加mysql连接,而不是postgresql – abhijeetmote
@abhijeetmote msql连接字符串为sqlalchemy可以像'mysql:// username:password @ hostname:port/database_name' – nehiljain