我已经在本地安装了气流,我正在更改执行器以运行并行任务为此,我更改了
1-数据库到Postgres 13.3
2-在配置文件中sql_alchemy_conn=postgresql+psycopg2://postgres:postgres@localhost/进展后
3-执行器=本地执行器
我已经检查了数据库,没有错误使用气流db检查-->信息-连接成功。气流数据库初始化-->初始化完成
我收到的错误,我根本不使用SQLite
1-{dag_processing.py:515}警告-因为我们在使用SQLite时不能使用超过1个线程(parsing_production=2(。因此,我们将并行度设置为1。
2-我从气流web界面收到此错误
The scheduler does not appear to be running.
The DAGs list may not update, and new tasks will not be scheduled.
那么我还需要做其他改变吗?
更改配置后,您是否真的重新启动了Airflow Web服务器/调度程序?
以下日志记录语句:
{dag_processing.py:515} WARNING - Because we cannot use more than 1 thread (parsing_processes = 2 ) when using SQLite. So we set parallelism to 1.
它来自Airflow 2.0.1,带有以下代码片段
if 'sqlite' in conf.get('core', 'sql_alchemy_conn') and self._parallelism > 1:
self.log.warning(
"Because we cannot use more than 1 thread (parsing_processes = "
"%d ) when using sqlite. So we set parallelism to 1.",
self._parallelism,
)
self._parallelism = 1
这意味着,根据您的[core] sql_alchemy_conn
设置,它仍然在"sqlite"上。我认为,如果您确信您更改了airflow.cfg
并重新启动了所有气流服务,那么它可能会像您预期的那样获取另一份airflow.cfg
。请检查日志以验证是否使用了正确的日志。