Skip to content

Commit

Permalink
Merge pull request #18215 from jdavcs/240_ts_db_script
Browse files Browse the repository at this point in the history
[24.0] Use config_section to distinguish between galaxy and ts or other apps
  • Loading branch information
jdavcs authored May 23, 2024
2 parents 1e59ea4 + a047ea0 commit 1c11fe1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/util/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def load_app_properties(
):
if config_file is None:
config_file = ini_file
config_section = ini_section
config_section = config_section or ini_section

# read from file or init w/no file
if config_file:
Expand Down
4 changes: 3 additions & 1 deletion lib/tool_shed/webapp/model/migrations/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def get_dburl_from_file(cwd: str, config_file: Optional[str] = None) -> str:
cwds = [cwd, os.path.join(cwd, CONFIG_DIR_NAME)]
config_file = find_config_file(DEFAULT_CONFIG_NAMES, dirs=cwds)

properties = load_app_properties(config_file=config_file, config_prefix=TOOLSHED_CONFIG_PREFIX)
properties = load_app_properties(
config_file=config_file, config_prefix=TOOLSHED_CONFIG_PREFIX, config_section="tool_shed"
)
default_url = f"sqlite:///{os.path.join(get_data_dir(properties), 'community.sqlite')}?isolation_level=IMMEDIATE"
url = properties.get("database_connection", default_url)
return url

0 comments on commit 1c11fe1

Please sign in to comment.