Skip to content

Commit

Permalink
handle bad schema
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish committed Nov 12, 2024
1 parent 804bd6a commit bbf1ce1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions airflow/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,11 @@ def load_policy_plugins(pm: pluggy.PluginManager):
def _get_async_conn_uri_from_sync():
scheme, rest = SQL_ALCHEMY_CONN.split(":", maxsplit=1)
scheme = scheme.split("+", maxsplit=1)[0]
aiolib = AIO_LIBS_MAPPING[scheme]
return f"{scheme}+{aiolib}:{rest}"
aiolib = AIO_LIBS_MAPPING.get(scheme)
if aiolib:
return f"{scheme}+{aiolib}:{rest}"
else:
return SQL_ALCHEMY_CONN


def configure_vars():
Expand Down

0 comments on commit bbf1ce1

Please sign in to comment.