我嘗試配置的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