You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2021/05/07 16:30:14 UTC
[airflow] branch master updated: Reduce false-positives when
detecting SQLite usage (#15716)
This is an automated email from the ASF dual-hosted git repository.
ash pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new e81ec7c Reduce false-positives when detecting SQLite usage (#15716)
e81ec7c is described below
commit e81ec7c6ad227897948ace6b06991c7553129072
Author: Sam Wheating <sa...@shopify.com>
AuthorDate: Fri May 7 12:30:02 2021 -0400
Reduce false-positives when detecting SQLite usage (#15716)
---
airflow/settings.py | 2 +-
airflow/utils/dag_processing.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow/settings.py b/airflow/settings.py
index c80a218..0db4a0a 100644
--- a/airflow/settings.py
+++ b/airflow/settings.py
@@ -244,7 +244,7 @@ def prepare_engine_args(disable_connection_pool=False):
if disable_connection_pool or not pool_connections:
engine_args['poolclass'] = NullPool
log.debug("settings.prepare_engine_args(): Using NullPool")
- elif 'sqlite' not in SQL_ALCHEMY_CONN:
+ elif not SQL_ALCHEMY_CONN.startswith('sqlite'):
# Pool size engine args not supported by sqlite.
# If no config value is defined for the pool size, select a reasonable value.
# 0 means no limit, which could lead to exceeding the Database connection limit.
diff --git a/airflow/utils/dag_processing.py b/airflow/utils/dag_processing.py
index aa6b1b6..8c5e8b5 100644
--- a/airflow/utils/dag_processing.py
+++ b/airflow/utils/dag_processing.py
@@ -525,7 +525,7 @@ class DagFileProcessorManager(LoggingMixin): # pylint: disable=too-many-instanc
os.set_blocking(self._signal_conn.fileno(), False)
self._parallelism = conf.getint('scheduler', 'parsing_processes')
- if 'sqlite' in conf.get('core', 'sql_alchemy_conn') and self._parallelism > 1:
+ if conf.get('core', 'sql_alchemy_conn').startswith('sqlite') 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.",