Skip to content

Commit

Permalink
Merge pull request #467 from OP-TED/feature/TED-1304
Browse files Browse the repository at this point in the history
Update config_resolver.py
  • Loading branch information
CaptainOfHacks authored Mar 28, 2023
2 parents a7ad704 + 6fa9272 commit c4e009d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions ted_sws/core/adapters/config_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,15 @@ def concrete_config_resolve(self, config_name: str, default_value: str = None):
:param default_value:
:return:
"""
from airflow.models import Variable
value = Variable.get(key=config_name, default_var=default_value)
logger.debug(
"[Airflow ENV] Value of '" + str(config_name) + "' is " + str(value) + "(supplied default is '" + str(
default_value) + "')")
return value
try:
from airflow.models import Variable
value = Variable.get(key=config_name, default_var=default_value)
logger.debug(
"[Airflow ENV] Value of '" + str(config_name) + "' is " + str(value) + "(supplied default is '" + str(
default_value) + "')")
return value
except:
return None


class EnvConfigResolver(ConfigResolverABC):
Expand Down

0 comments on commit c4e009d

Please sign in to comment.