Skip to content

Commit

Permalink
fix loading of fence config
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertSnows committed Jan 10, 2025
1 parent af9ade7 commit 282bcda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fence/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
# Load the configuration *before* importing modules that rely on it
from fence.config import config, get_SQLAlchemyDriver
from fence.settings import CONFIG_SEARCH_FOLDERS

config.load(
config_path=os.environ.get("FENCE_CONFIG_PATH"),
search_folders=CONFIG_SEARCH_FOLDERS,
)

from fence.auth import logout, build_redirect_url
from fence.metrics import metrics
from fence.blueprints.data.indexd import S3IndexedFileLocation
Expand Down
5 changes: 5 additions & 0 deletions fence/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from fence.errors import NotFound
from fence.utils import log_backoff_retry, log_backoff_giveup, exception_do_not_retry, logger
from fence.settings import CONFIG_SEARCH_FOLDERS

logger = get_logger(__name__)

Expand Down Expand Up @@ -173,6 +174,10 @@ def _validate_parent_child_studies(dbgap_configs):


config = FenceConfig(DEFAULT_CFG_PATH)
config.load(
config_path=os.environ.get("FENCE_CONFIG_PATH"),
search_folders=CONFIG_SEARCH_FOLDERS,
)

# Default settings to control usage of backoff library.
DEFAULT_BACKOFF_SETTINGS = {
Expand Down

0 comments on commit 282bcda

Please sign in to comment.