From 27b988b6298e350d28ad275140552abf05752ae7 Mon Sep 17 00:00:00 2001 From: Pierre Jeambrun Date: Wed, 20 Nov 2024 05:21:02 +0800 Subject: [PATCH] AIP-84 Fix sqlite in non tests environment (#44149) --- airflow/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/settings.py b/airflow/settings.py index 8041c8f29424e..5b458efcba473 100644 --- a/airflow/settings.py +++ b/airflow/settings.py @@ -490,7 +490,7 @@ def configure_orm(disable_connection_pool=False, pool_class=None): else: connect_args = {} - if os.environ.get("AIRFLOW__CORE__UNIT_TEST_MODE") == "True" and SQL_ALCHEMY_CONN.startswith("sqlite"): + if SQL_ALCHEMY_CONN.startswith("sqlite"): # FastAPI runs sync endpoints in a separate thread. SQLite does not allow # to use objects created in another threads by default. Allowing that in test # to so the `test` thread and the tested endpoints can use common objects.